Advertisement
Guest User

Untitled

a guest
Jan 11th, 2022
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.13 KB | None | 0 0
  1. # Version of docker-compose.
  2. version: '3'
  3.  
  4. # Containers we're going to run.
  5. services:
  6.   # Our Phoenix container.
  7.    phoenix:
  8.      # The build parameters for this container.
  9.       build:
  10.         # Here we define that it should build from the current directory.
  11.          context: .
  12.       environment:
  13.          DATABASE_URL: ecto://postgres:postgres@db/wb_portfolio
  14.          SECRET_KEY_BASE: super-secret
  15.       ports:
  16.         # Mapping the port to make the Phoenix app accessible outside of the container.
  17.          - '4000:4000'
  18.       depends_on:
  19.         # The DB container needs to be started before we start this container.
  20.          - db
  21.    db:
  22.      # We use the predefined Postgres image.
  23.       image: postgis/postgis:latest
  24.       environment:
  25.         # Set user/password for Postgres.
  26.          POSTGRES_USER: postgres
  27.          POSTGRES_PASSWORD: postgres
  28.          # Set a path where Postgres should store the data.
  29.          PGDATA: /var/lib/postgresql/data/pgdata
  30.       restart: always
  31.       volumes:
  32.         - pgdata:/var/lib/postgresql/data
  33.       ports:
  34.        - 5432:5432
  35. # Define the volumes.
  36. volumes:
  37.   pgdata:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement