2021-07-02 13:48:40 +00:00
|
|
|
version: "3.2"
|
2018-07-25 14:42:04 +00:00
|
|
|
services:
|
|
|
|
postgres:
|
2018-10-11 15:37:39 +00:00
|
|
|
container_name: mobilizon_db
|
2018-07-25 14:42:04 +00:00
|
|
|
restart: unless-stopped
|
2021-07-02 13:48:40 +00:00
|
|
|
image: postgis/postgis
|
2018-07-25 14:42:04 +00:00
|
|
|
environment:
|
2021-07-02 13:48:40 +00:00
|
|
|
- POSTGRES_USER
|
|
|
|
- POSTGRES_PASSWORD
|
|
|
|
- POSTGRES_DB
|
|
|
|
- POSTGRES_PORT
|
2019-04-17 15:14:44 +00:00
|
|
|
volumes:
|
|
|
|
- pgdata:/var/lib/postgresql/data
|
2018-07-25 14:42:04 +00:00
|
|
|
api:
|
2018-10-11 15:37:39 +00:00
|
|
|
container_name: mobilizon_api
|
2018-07-25 14:42:04 +00:00
|
|
|
restart: unless-stopped
|
|
|
|
build: .
|
|
|
|
volumes:
|
2020-12-21 09:08:43 +00:00
|
|
|
- ".:/app"
|
2018-07-25 14:42:04 +00:00
|
|
|
ports:
|
2021-07-02 13:48:40 +00:00
|
|
|
- 4000:4000
|
2018-07-25 14:42:04 +00:00
|
|
|
depends_on:
|
|
|
|
- postgres
|
|
|
|
environment:
|
2019-04-17 15:16:21 +00:00
|
|
|
MIX_ENV: "dev"
|
2020-01-30 19:27:25 +00:00
|
|
|
DOCKER: "true"
|
2019-01-03 10:33:52 +00:00
|
|
|
MOBILIZON_INSTANCE_NAME: My Mobilizon Instance
|
2021-07-02 13:48:40 +00:00
|
|
|
MOBILIZON_INSTANCE_HOST: localhost
|
|
|
|
MOBILIZON_INSTANCE_HOST_PORT: 4000
|
|
|
|
MOBILIZON_INSTANCE_PORT: 4000
|
2019-01-03 10:33:52 +00:00
|
|
|
MOBILIZON_INSTANCE_EMAIL: noreply@mobilizon.me
|
2019-04-17 15:13:20 +00:00
|
|
|
MOBILIZON_INSTANCE_REGISTRATIONS_OPEN: "true"
|
2021-07-02 13:48:40 +00:00
|
|
|
MOBILIZON_DATABASE_PASSWORD: ${POSTGRES_PASSWORD}
|
|
|
|
MOBILIZON_DATABASE_USERNAME: ${POSTGRES_USER}
|
|
|
|
MOBILIZON_DATABASE_DBNAME: ${POSTGRES_DB}
|
2019-01-03 10:33:52 +00:00
|
|
|
MOBILIZON_DATABASE_HOST: postgres
|
2021-07-02 13:48:40 +00:00
|
|
|
MOBILIZON_DATABASE_PORT: ${POSTGRES_PORT}
|
2019-10-22 20:16:18 +00:00
|
|
|
command: >
|
|
|
|
sh -c "cd js &&
|
2021-07-02 13:48:40 +00:00
|
|
|
yarn --cwd "js" install &&
|
|
|
|
yarn --cwd "js" run build:pictures &&
|
2019-10-22 20:16:18 +00:00
|
|
|
cd ../ &&
|
|
|
|
mix deps.get &&
|
|
|
|
mix compile &&
|
|
|
|
mix ecto.create &&
|
|
|
|
mix ecto.migrate &&
|
|
|
|
mix phx.server"
|
2019-04-17 15:14:44 +00:00
|
|
|
volumes:
|
|
|
|
pgdata:
|
|
|
|
.:
|