From 2012d1b011e006ade47f0c7472eb7b02b1450a9f Mon Sep 17 00:00:00 2001 From: prichier Date: Tue, 27 Oct 2020 17:43:31 +0100 Subject: [PATCH] Get back original root Dockerfile --- docker-compose.yml | 72 +++++++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 33 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 25d62b4fb..3df763f40 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,39 +1,45 @@ -version: "3" +version: '3' services: - mobilizon: - image: mobilizon + postgres: + container_name: mobilizon_db + restart: unless-stopped + image: mdillon/postgis:11 environment: - - MOBILIZON_INSTANCE_NAME - - MOBILIZON_INSTANCE_HOST - - MOBILIZON_INSTANCE_EMAIL - - MOBILIZON_REPLY_EMAIL - - MOBILIZON_INSTANCE_REGISTRATIONS_OPEN=true - - MOBILIZON_DATABASE_USERNAME=${POSTGRES_USER} - - MOBILIZON_DATABASE_PASSWORD=${POSTGRES_PASSWORD} - - MOBILIZON_DATABASE_DBNAME=${POSTGRES_DB} - - MOBILIZON_DATABASE_HOST=db - - MOBILIZON_INSTANCE_SECRET_KEY_BASE - - MOBILIZON_INSTANCE_SECRET_KEY - - MOBILIZON_SMTP_SERVER=yoursmtpserver - - MOBILIZON_SMTP_HOSTNAME=your.smtp.domain - - MOBILIZON_SMTP_USERNAME - - MOBILIZON_SMTP_PASSWORD + POSTGRES_PASSWORD: postgres + POSTGRES_DB: mobilizon_dev volumes: - - /tmp/public/upload:/app/upload + - pgdata:/var/lib/postgresql/data + api: + container_name: mobilizon_api + restart: unless-stopped + build: . + volumes: + - '.:/app' ports: - - "4000:4000" - - db: - image: postgis/postgis - volumes: - - /tmp/db:/var/lib/postgresql/data + - "4000:4000" + depends_on: + - postgres environment: - - POSTGRES_USER - - POSTGRES_PASSWORD - - POSTGRES_DB - -networks: - default: - ipam: - driver: default + MIX_ENV: "dev" + DOCKER: "true" + MOBILIZON_INSTANCE_NAME: My Mobilizon Instance + MOBILIZON_INSTANCE_HOST: mobilizon.me + MOBILIZON_INSTANCE_EMAIL: noreply@mobilizon.me + MOBILIZON_INSTANCE_REGISTRATIONS_OPEN: "true" + MOBILIZON_DATABASE_PASSWORD: postgres + MOBILIZON_DATABASE_USERNAME: postgres + MOBILIZON_DATABASE_DBNAME: mobilizon_dev + MOBILIZON_DATABASE_HOST: postgres + command: > + sh -c "cd js && + yarn install && + cd ../ && + mix deps.get && + mix compile && + mix ecto.create && + mix ecto.migrate && + mix phx.server" +volumes: + pgdata: + .: