2023-06-11 07:01:57 -04:00
|
|
|
version: "3.5"
|
|
|
|
|
|
|
|
services:
|
|
|
|
server:
|
|
|
|
build: ./server
|
|
|
|
networks:
|
|
|
|
- web
|
|
|
|
- internal
|
|
|
|
environment:
|
|
|
|
POSTGRES_PASSWORD_FILE: /run/secrets/postgres-password
|
|
|
|
POSTGRES_USER: kalkulog
|
|
|
|
POSTGRES_DB: kalkulog
|
|
|
|
POSTGRES_HOST: database
|
|
|
|
secrets: [ postgres-password ]
|
|
|
|
depends_on: [ database ]
|
2023-06-11 09:04:29 -04:00
|
|
|
ports:
|
|
|
|
# TODO remove in prod
|
|
|
|
- 8000:8000
|
2023-06-11 07:01:57 -04:00
|
|
|
database:
|
|
|
|
image: postgres
|
|
|
|
environment:
|
|
|
|
POSTGRES_PASSWORD_FILE: /run/secrets/postgres-password
|
|
|
|
POSTGRES_USER: kalkulog
|
|
|
|
POSTGRES_DB: kalkulog
|
|
|
|
secrets: [ postgres-password ]
|
|
|
|
networks: [ internal ]
|
2023-06-13 10:18:20 -04:00
|
|
|
volumes:
|
|
|
|
- ./db.mount:/var/lib/postgresql/data
|
2023-06-11 07:01:57 -04:00
|
|
|
|
|
|
|
secrets:
|
|
|
|
postgres-password:
|
|
|
|
file: ./server/postgres.pw
|
|
|
|
|
|
|
|
networks:
|
|
|
|
internal:
|
|
|
|
internal: true
|
|
|
|
web:
|
|
|
|
external: true
|