Last active
September 1, 2015 19:05
-
-
Save ybur-yug/ebab1aa9a1dc6a7c6421 to your computer and use it in GitHub Desktop.
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: . | |
| environment: | |
| AWS_ACCESS_KEY_ID: access_key | |
| AWS_SECRET_ACCESS_KEY: secret_key # both intentionally omittedd | |
| DEV_AWS_BUCKET_NAME: bucket | |
| TEST_AWS_BUCKET_NAME: bucket | |
| command: iex -S mix | |
| stdin_open: true | |
| tty: true | |
| volumes: | |
| - .:/app |
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 ubuntu:15.04 | |
| MAINTAINER Johnny Mejias jmejias17@gmail.com | |
| # Locale setup due to defaults that come from being in PR | |
| RUN locale-gen en_US.UTF-8 | |
| ENV LANGUAGE en_US.UTF-8 | |
| ENV LANG en_US.UTF-8 | |
| ENV LC_ALL en_US.UTF-8 | |
| RUN apt-get update && \ | |
| apt-get -y install wget curl | |
| RUN echo "deb http://packages.erlang-solutions.com/ubuntu vivid contrib" >> /etc/apt/sources.list | |
| RUN mkdir /Downloads | |
| WORKDIR /Downloads | |
| RUN wget http://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc | |
| RUN apt-key add erlang_solutions.asc | |
| RUN apt-get update && \ | |
| apt-get -y install git && \ | |
| apt-get -y install erlang && \ | |
| apt-get -y install erlang-base-hipe && \ | |
| apt-get -y install elixir && \ | |
| mkdir /app | |
| COPY mix.exs /app/mix.exs | |
| WORKDIR /app | |
| RUN mix local.hex --force && \ | |
| mix local.rebar --force | |
| RUN mix do deps.get, compile |
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
| .PHONY: pull up start all | |
| all: | |
| @echo "Commands to build access terminal using docker-compose" | |
| @echo "Plain commands default to dev environment" | |
| @echo "make build" | |
| @echo "make up" | |
| @echo "make console" | |
| @echo "make test" | |
| build: | |
| docker-compose build | |
| up: | |
| docker-compose up | |
| console: | |
| docker-compose run --rm web iex -S mix | |
| run-tests: | |
| docker-compose run --rm web mix test |
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
| defmodule AccessUpload.Mixfile do | |
| use Mix.Project | |
| def project do | |
| [app: :access_upload, | |
| version: "0.0.1", | |
| elixir: "~> 1.0", | |
| build_embedded: Mix.env == :prod, | |
| start_permanent: Mix.env == :prod, | |
| deps: deps] | |
| end | |
| def application do | |
| [applications: [:logger, :ssl, :erlcloud, :httpoison], | |
| mod: {AccessUpload, []}] | |
| end | |
| defp deps do | |
| [ | |
| {:erlcloud, git: "https://github.com/gleber/erlcloud"}, | |
| {:httpoison, "~> 0.7.2"}, | |
| {:poison, "~> 1.5"} | |
| ] | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment