Files
OHTU-German-learning-website/docker-compose.yml
T
Axel AdlercreutzandGitHub 21e465a002 axel/update port (#33)
* updated port

* updated port

* fix script ports
2025-01-30 14:44:28 +02:00

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: