mirror of
https://github.com/danbee/chess
synced 2025-03-04 08:39:06 +00:00
Codeship Pro
This commit is contained in:
parent
60d6888507
commit
0a0b083e38
29
Dockerfile
Normal file
29
Dockerfile
Normal file
@ -0,0 +1,29 @@
|
||||
FROM elixir:1.6.0
|
||||
|
||||
ENV PHANTOMJS_VERSION 2.1.1
|
||||
ENV PHANTOMJS_DIR /phantomjs
|
||||
|
||||
WORKDIR /phantomjs
|
||||
|
||||
RUN wget -q --continue \
|
||||
"https://s3.amazonaws.com/codeship-packages/phantomjs-${PHANTOMJS_VERSION}-linux-x86_64.tar.bz2"
|
||||
RUN tar -xjf phantomjs* \
|
||||
--strip-components=1
|
||||
|
||||
ENV PATH $PHANTOMJS_DIR/bin:$PATH
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN mix local.rebar --force && mix local.hex --force
|
||||
|
||||
COPY mix.exs mix.lock ./
|
||||
RUN mix deps.get
|
||||
RUN mix deps.compile
|
||||
|
||||
WORKDIR /app/assets
|
||||
COPY assets/ ./
|
||||
RUN yarn install && yarn run build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . ./
|
||||
17
codeship-services.yml
Normal file
17
codeship-services.yml
Normal file
@ -0,0 +1,17 @@
|
||||
app:
|
||||
build:
|
||||
image: danbee/chess
|
||||
dockerfile: Dockerfile
|
||||
depends_on:
|
||||
- db
|
||||
environment:
|
||||
MIX_ENV: test
|
||||
POSTGRES_HOST: db
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: password
|
||||
|
||||
db:
|
||||
image: healthcheck/postgres:alpine
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: password
|
||||
7
codeship-steps.yml
Normal file
7
codeship-steps.yml
Normal file
@ -0,0 +1,7 @@
|
||||
- name: create_db
|
||||
command: mix ecto.create ecto.migrate
|
||||
service: app
|
||||
|
||||
- name: mix_test
|
||||
command: mix test
|
||||
service: app
|
||||
@ -19,6 +19,8 @@ config :chess, Chess.Mailer,
|
||||
config :chess, Chess.Repo,
|
||||
adapter: Ecto.Adapters.Postgres,
|
||||
database: "chess_test",
|
||||
hostname: "localhost",
|
||||
hostname: System.get_env("POSTGRES_HOST") || "localhost",
|
||||
port: System.get_env("POSTGRES_PORT") || "5432",
|
||||
username: System.get_env("POSTGRES_USER") || System.get_env("USER"),
|
||||
password: System.get_env("POSTGRES_PASSWORD") || nil,
|
||||
pool: Ecto.Adapters.SQL.Sandbox
|
||||
|
||||
Loading…
Reference in New Issue
Block a user