services: postgres: image: postgis/postgis:16-3.4 container_name: postgres_simple restart: unless-stopped ports: - "0.0.0.0:5432:5432" environment: - POSTGRES_PASSWORD_FILE=/run/secrets/postgres_root_password volumes: - postgres_simple_data:/var/lib/postgresql/data - /etc/localtime:/etc/localtime - /var/backups/postgres:/backups secrets: - postgres_root_password networks: - default - db-migration healthcheck: test: ["CMD", "pg_isready", "-U", "postgres"] interval: 10s timeout: 5s retries: 5 logging: driver: "json-file" options: max-size: "10m" max-file: "3" volumes: postgres_simple_data: name: postgres_simple_data secrets: postgres_root_password: file: .secrets/postgres_root_password networks: default: name: postgres_simple_default db-migration: external: true