Files
databasus/docker-compose.yml.example

43 lines
1.1 KiB
Plaintext

version: "3"
# Do not use this file in production or VPS. This
# file is indended for local development only. To
# run on your machine - read README.md
services:
# For local development only to test build. Do
# not use in production or VPS
postgresus-local:
build:
context: .
dockerfile: Dockerfile
ports:
- "4005:4005"
volumes:
- ./postgresus-data:/postgresus-data
container_name: postgresus-local
depends_on:
postgresus-db:
condition: service_healthy
restart: unless-stopped
postgresus-db:
image: postgres:17
# we use default values, but do not expose
# PostgreSQL ports so it is safe
environment:
- POSTGRES_DB=postgresus
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=Q1234567
volumes:
- ./pgdata:/var/lib/postgresql/data
container_name: postgresus-db
command: -p 5437
shm_size: 10gb
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d postgresus -p 5437"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped