Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Version of docker-compose.
- 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: .
- environment:
- DATABASE_URL: ecto://postgres:postgres@db/wb_portfolio
- SECRET_KEY_BASE: super-secret
- 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: postgis/postgis:latest
- 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
- volumes:
- - pgdata:/var/lib/postgresql/data
- ports:
- - 5432:5432
- # Define the volumes.
- volumes:
- pgdata:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement