mobilizon/docker-compose.yml
Thomas Citharel 8310ae46cd
Restore Docker development
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-03 18:10:21 +02:00

51 lines
1.3 KiB
YAML

version: "3.2"
services:
postgres:
container_name: mobilizon_db
restart: unless-stopped
image: postgis/postgis
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
- POSTGRES_PORT
volumes:
- pgdata:/var/lib/postgresql/data
api:
container_name: mobilizon_api
restart: unless-stopped
build: .
volumes:
- ".:/app"
ports:
- 4000:4000
depends_on:
- postgres
environment:
MIX_ENV: "dev"
DOCKER: "true"
MOBILIZON_INSTANCE_NAME: My Mobilizon Instance
MOBILIZON_INSTANCE_HOST: localhost
MOBILIZON_INSTANCE_HOST_PORT: 4000
MOBILIZON_INSTANCE_PORT: 4000
MOBILIZON_INSTANCE_EMAIL: noreply@mobilizon.me
MOBILIZON_INSTANCE_REGISTRATIONS_OPEN: "true"
MOBILIZON_DATABASE_PASSWORD: ${POSTGRES_PASSWORD}
MOBILIZON_DATABASE_USERNAME: ${POSTGRES_USER}
MOBILIZON_DATABASE_DBNAME: ${POSTGRES_DB}
MOBILIZON_DATABASE_HOST: postgres
MOBILIZON_DATABASE_PORT: ${POSTGRES_PORT}
command: >
sh -c "cd js &&
yarn --cwd "js" install &&
yarn --cwd "js" run build:pictures &&
cd ../ &&
mix deps.get &&
mix compile &&
mix ecto.create &&
mix ecto.migrate &&
mix phx.server"
volumes:
pgdata:
.: