diff --git a/docker-compose.yml b/docker-compose.yml index 36f75cf..e4612fe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,53 +1,55 @@ # Version of docker-compose. -version: '3' +version: "3" # Containers we're going to run. services: - # Our Phoenix container. - phoenix: - # The build parameters for this container. - build: - # Here we define that it should build from the current directory. - context: . - args: - - MIX_ENV=prod - environment: - # Variables to connect to our Postgres server. - DB_USER: postgres - DB_PASSWORD: postgres - DB_NAME: arke-test - DB_HOSTNAME: db - DB_PORT: 5432 + # Our Phoenix container. + phoenix: + # The build parameters for this container. + build: + # Here we define that it should build from the current directory. + context: . + args: + - MIX_ENV=prod + environment: + # Variables to connect to our Postgres server. + DB_USER: postgres + DB_PASSWORD: postgres + DB_NAME: arke-test + DB_HOSTNAME: db + DB_PORT: 5432 - PGUSER: postgres - PGPASSWORD: postgres - PGDATABASE: arke-test - PGPORT: 5432 - PGHOST: db + PGUSER: postgres + PGPASSWORD: postgres + PGDATABASE: arke-test + PGPORT: 5432 + PGHOST: db - MIX_ENV: prod - SECRET_KEY_BASE: change_me - ports: - # Mapping the port to make the Phoenix app accessible outside of the container. - - '4000:4000' - depends_on: - # The DB container needs to be started before we start this container. - - db - db: - # We use the predefined Postgres image. - image: postgres:14.4 - environment: - # Set user/password for Postgres. - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - # Set a path where Postgres should store the data. - PGDATA: /var/lib/postgresql/data/pgdata - restart: always - ports: - # Mapping the port to make the Phoenix app accessible outside of the container. - - '5432:5432' - volumes: - - pgdata:/var/lib/postgresql/data + PROJECT_ID: ${PROJECT_ID} + + MIX_ENV: prod + SECRET_KEY_BASE: change_me + ports: + # Mapping the port to make the Phoenix app accessible outside of the container. + - "4000:4000" + depends_on: + # The DB container needs to be started before we start this container. + - db + db: + # We use the predefined Postgres image. + image: postgres:14.4 + environment: + # Set user/password for Postgres. + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + # Set a path where Postgres should store the data. + PGDATA: /var/lib/postgresql/data/pgdata + restart: always + ports: + # Mapping the port to make the Phoenix app accessible outside of the container. + - "5432:5432" + volumes: + - pgdata:/var/lib/postgresql/data # Define the volumes. volumes: - pgdata: \ No newline at end of file + pgdata: