Mario Hüttel
d2ce635f05
* Use a dedicated postgresql container as database * Controlled via .env file * Ecample script for interactive container startup
37 lines
1.1 KiB
YAML
37 lines
1.1 KiB
YAML
services:
|
|
shimatta-kenkyusho-web:
|
|
build: .
|
|
volumes:
|
|
- "${DJANGO_STATIC_VOL:-./run/static}:/var/static"
|
|
- "${DJANGO_MEDIA_VOL:-./run/media}:/var/media"
|
|
environment:
|
|
DJANGO_POSTGRESQL_PW: "${DJANGO_POSTGRESQL_PW:-p4ssw0rd}"
|
|
DJANGO_POSTGRESQL_USER: "postgres"
|
|
DJANGO_SECRET_KEY: "${DJANGO_SECRET_KEY}"
|
|
DJANGO_ALLOWED_HOST: "${DJANGO_ALLOWED_HOST}"
|
|
DJANGO_STATIC_ROOT: "/var/static"
|
|
DJANGO_MEDIA_URL: "${DJANGO_MEDIA_URL}"
|
|
DJANGO_MEDIA_ROOT: "/var/media"
|
|
DJANGO_POSTGRESQL_SOCKET: "shimatta-kenkyusho-db"
|
|
DJANGO_POSTGRESQL_PORT: "5432"
|
|
DJANGO_FORCE_DEV_MODE: ${DJANGO_FORCE_DEV_MODE:-False}
|
|
ports:
|
|
- "${PORT}:8000"
|
|
networks:
|
|
- backendnet
|
|
depends_on:
|
|
- "shimatta-kenkyusho-db"
|
|
|
|
shimatta-kenkyusho-db:
|
|
image: postgres:16.5-alpine
|
|
environment:
|
|
POSTGRES_PASSWORD: "${DJANGO_POSTGRESQL_PW:-p4ssw0rd}"
|
|
POSTGRES_DB: "shimatta_kenkyusho"
|
|
volumes:
|
|
- "${PGDATA:-./run/pgdata}:/var/lib/postgresql/data"
|
|
networks:
|
|
- backendnet
|
|
|
|
networks:
|
|
backendnet:
|