Don't use entrypoints in docker

This commit is contained in:
Vincent 2019-04-17 17:16:21 +02:00
parent 990bfac44c
commit 040266a656
4 changed files with 8 additions and 35 deletions

View File

@ -17,10 +17,10 @@ services:
restart: unless-stopped
build: ./js
volumes:
- './js:/app/js'
- '.:/app'
ports:
- "8888:8080"
entrypoint: entrypoint
command: yarn run dev
api:
container_name: mobilizon_api
@ -32,10 +32,9 @@ services:
- "4000:4001"
depends_on:
- postgres
- front
environment:
# Environment: Prod when ready
MIX_ENV: dev
# Instance
MIX_ENV: "dev"
MOBILIZON_INSTANCE_NAME: My Mobilizon Instance
MOBILIZON_INSTANCE_HOST: mobilizon.me
MOBILIZON_INSTANCE_EMAIL: noreply@mobilizon.me
@ -44,7 +43,7 @@ services:
MOBILIZON_DATABASE_USERNAME: postgres
MOBILIZON_DATABASE_DBNAME: mobilizon_dev
MOBILIZON_DATABASE_HOST: postgres
entrypoint: entrypoint
command: "mix phx.migrate_serve"
volumes:
pgdata:
.:

View File

@ -1,22 +0,0 @@
#!/bin/bash
mix deps.get
# Wait for Postgres to become available.
until PGPASSWORD=$MOBILIZON_DATABASE_PASSWORD psql -h $MOBILIZON_DATABASE_HOST -U $MOBILIZON_DATABASE_USERNAME -c '\q' 2>/dev/null; do
>&2 echo "Postgres is unavailable - sleeping"
sleep 1
done
echo "\nPostgres is available: continuing with database setup..."
# Potentially Set up the database
mix ecto.create
mix ecto.migrate
echo "\nTesting the installation..."
# "Proove" that install was successful by running the tests
mix test
echo "\n Launching Phoenix web server..."
iex -S mix phx.server

View File

@ -2,7 +2,8 @@ FROM node:10
LABEL maintainer="tcit"
COPY docker/entrypoint.sh /bin/entrypoint
RUN yarn install
RUN yarn upgrade node-sass
WORKDIR /app/js

View File

@ -1,5 +0,0 @@
#!/bin/bash
yan install
yarn rebuild node-sass
yarn run dev