- Add Dockerfile.backup for backup container - Add backup.py script with PostgreSQL backup functionality - Add backup service to docker-compose.prod.yml - Update env.production.example with backup configuration - Add db/README.md with backup system documentation Features: - Automated daily backups (07:30, 18:00) - Local and FTP remote backup support - 7-day retention policy - PostgreSQL 16 client for waceplm database
67 lines
1.7 KiB
YAML
67 lines
1.7 KiB
YAML
services:
|
|
wace-plm:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: wace-plm
|
|
restart: always
|
|
env_file:
|
|
- .env.production
|
|
# ports: # Traefik will handle exposing the service
|
|
stdin_open: true
|
|
tty: true
|
|
depends_on:
|
|
- wace-plm-db
|
|
environment:
|
|
CATALINA_OPTS: >-
|
|
-DDB_URL=${DB_URL}
|
|
-DDB_USERNAME=${DB_USERNAME}
|
|
-DDB_PASSWORD=${DB_PASSWORD}
|
|
volumes:
|
|
- /home/wace-plm/project_data:/data_storage
|
|
- /home/wace-plm/app_data:/path/inside/container
|
|
- ./WebContent:/usr/local/tomcat/webapps/ROOT
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.http.routers.wace-plm.rule=Host(`waceplm.esgrin.com`)
|
|
- traefik.http.routers.wace-plm.entrypoints=websecure,web
|
|
- traefik.http.routers.wace-plm.tls=true
|
|
- traefik.http.routers.wace-plm.tls.certresolver=le
|
|
- traefik.http.services.wace-plm.loadbalancer.server.port=8080
|
|
|
|
wace-plm-db:
|
|
image: dockerhub.wace.me/postgres:16.8-alpine3.21.linux
|
|
container_name: wace-plm-db
|
|
restart: always
|
|
env_file:
|
|
- .env.production
|
|
volumes:
|
|
- /home/wace-plm/postgres_data:/var/lib/postgresql/data
|
|
|
|
ports:
|
|
- "11133:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres -d waceplm"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
wace-plm-backup:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.backup
|
|
container_name: wace-plm-backup
|
|
restart: always
|
|
env_file:
|
|
- .env.production
|
|
depends_on:
|
|
wace-plm-db:
|
|
condition: service_healthy
|
|
volumes:
|
|
- /home/wace-plm/backups:/backups/local
|
|
|
|
networks:
|
|
default:
|
|
external:
|
|
name: toktork_server_default
|