You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
860 B
40 lines
860 B
services: |
|
db: |
|
build: ./db |
|
volumes: |
|
- pgdata:/var/lib/postgresql/data |
|
environment: |
|
POSTGRES_USER: ${POSTGRES_USER} |
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} |
|
POSTGRES_DB: ${POSTGRES_DB} |
|
networks: |
|
- internal |
|
restart: unless-stopped |
|
healthcheck: |
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"] |
|
interval: 5s |
|
timeout: 5s |
|
retries: 5 |
|
|
|
app: |
|
build: . |
|
ports: |
|
- "${PORT:-4000}:${PORT:-4000}" |
|
environment: |
|
DATABASE_URL: "ecto://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db/${POSTGRES_DB}" |
|
SECRET_KEY_BASE: ${SECRET_KEY_BASE} |
|
PHX_HOST: ${PHX_HOST} |
|
PORT: ${PORT:-4000} |
|
depends_on: |
|
db: |
|
condition: service_healthy |
|
networks: |
|
- internal |
|
restart: unless-stopped |
|
|
|
volumes: |
|
pgdata: |
|
|
|
networks: |
|
internal: |
|
driver: bridge
|
|
|