Improve docker setup
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
c82288a627
commit
7b23ca6965
|
@ -7,4 +7,4 @@ RUN mix local.hex --force && mix local.rebar --force
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
EXPOSE 4000 4001 4002
|
EXPOSE 4000
|
||||||
|
|
7
Makefile
7
Makefile
|
@ -4,7 +4,12 @@ init:
|
||||||
|
|
||||||
start: stop
|
start: stop
|
||||||
@bash docker/message.sh "starting Mobilizon with docker"
|
@bash docker/message.sh "starting Mobilizon with docker"
|
||||||
docker-compose up -d
|
docker-compose up -d api
|
||||||
|
docker-compose exec api sh -c "cd js && yarn install && cd ../"
|
||||||
|
docker-compose exec api mix deps.get
|
||||||
|
docker-compose exec api mix compile
|
||||||
|
docker-compose exec api mix ecto.create
|
||||||
|
docker-compose exec api mix ecto.migrate
|
||||||
@bash docker/message.sh "started"
|
@bash docker/message.sh "started"
|
||||||
stop:
|
stop:
|
||||||
@bash docker/message.sh "stopping Mobilizon"
|
@bash docker/message.sh "stopping Mobilizon"
|
||||||
|
|
|
@ -30,7 +30,7 @@ services:
|
||||||
MOBILIZON_DATABASE_USERNAME: postgres
|
MOBILIZON_DATABASE_USERNAME: postgres
|
||||||
MOBILIZON_DATABASE_DBNAME: mobilizon_dev
|
MOBILIZON_DATABASE_DBNAME: mobilizon_dev
|
||||||
MOBILIZON_DATABASE_HOST: postgres
|
MOBILIZON_DATABASE_HOST: postgres
|
||||||
command: "mix phx.deps_migrate_serve"
|
command: "mix phx.server"
|
||||||
volumes:
|
volumes:
|
||||||
pgdata:
|
pgdata:
|
||||||
.:
|
.:
|
||||||
|
|
Loading…
Reference in New Issue