This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| web: | |
| build: . | |
| ports: | |
| - 80:4040 | |
| - 443:4040 | |
| command: mix phoenix.server | |
| labels: | |
| - convox.port.80.protocol=http | |
| - convox.port.443.protocol=https |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM elixir:1.3 | |
| RUN apt-get update | |
| RUN apt-get install -y erlang-dev erlang-parsetools | |
| ENV PHOENIX_VERSION 1.2.0 | |
| RUN mix archive.install --force https://github.com/phoenixframework/archives/raw/master/phoenix_new-$PHOENIX_VERSION.ez | |
| WORKDIR /code | |
| COPY . . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| query = """ | |
| SELECT id, name, inserted_at | |
| FROM users | |
| UNION | |
| SELECT id, name, inserted_at | |
| FROM customers | |
| WHERE name = $1 | |
| """ | |
| Ecto.Adapters.SQL.query!(MyApp.Repo, query, ["Carol"]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rrobots' | |
| class JankyBot | |
| include Robot | |
| def tick(event) | |
| accelerate(rand(8)) | |
| turn(rand(10)) | |
| fire(rand(3)) | |
| end |