mirror of
https://github.com/OHTU-German-learning-website/OHTU-German-learning-website.git
synced 2026-10-12 19:13:51 +03:00
41 lines
1.2 KiB
YAML
41 lines
1.2 KiB
YAML
version: "3.6"
|
|
services:
|
|
db:
|
|
image: postgres:15
|
|
container_name: gradesa-db
|
|
environment:
|
|
POSTGRES_PASSWORD: password
|
|
volumes:
|
|
- pg-data:/var/lib/postgresql/data/
|
|
- ./provision_db.sql:/docker-entrypoint-initdb.d/1_provision_db.sql
|
|
restart: unless-stopped
|
|
ports:
|
|
- "7742:5432"
|
|
healthcheck:
|
|
test: ["CMD", "pg_isready", "-U", "postgres"]
|
|
interval: 10s
|
|
retries: 20
|
|
pgtestdb:
|
|
image: postgres:15
|
|
container_name: gradesa-pgtestdb
|
|
environment:
|
|
POSTGRES_PASSWORD: password
|
|
volumes:
|
|
# Uses a tmpfs volume to make tests extremely fast. The data in test
|
|
# databases is not persisted across restarts, nor does it need to be.
|
|
- type: tmpfs
|
|
target: /var/lib/postgresql/data/
|
|
restart: unless-stopped
|
|
command: >
|
|
sh -c "apt update && apt install -y postgresql-15-rum &&
|
|
echo 'trusted = true' >> /usr/share/postgresql/15/extension/rum.control &&
|
|
/usr/local/bin/docker-entrypoint.sh -c fsync=off -c log_statement=all"
|
|
ports:
|
|
- "7741:5432"
|
|
healthcheck:
|
|
test: ["CMD", "pg_isready", "-U", "postgres"]
|
|
interval: 10s
|
|
retries: 20
|
|
volumes:
|
|
pg-data:
|