- Add Docker Compose configurations for dev, prod, and standalone environments - Add database initialization scripts (init-db.sh, init-db-docker.sh) - Add enhanced start-docker-linux.sh with DB init support - Add comprehensive database initialization guide - Support for automatic dbexport.pgsql import on first run - Include safety checks for production environment
64 lines
1.5 KiB
YAML
64 lines
1.5 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
wace-plm:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.dev
|
|
container_name: wace-plm-standalone
|
|
ports:
|
|
- "8090:8080"
|
|
environment:
|
|
CATALINA_OPTS: >-
|
|
-DDB_URL=jdbc:postgresql://wace-plm-db:5432/waceplm
|
|
-DDB_USERNAME=postgres
|
|
-DDB_PASSWORD=waceplm0909!!
|
|
-Xms512m
|
|
-Xmx1024m
|
|
volumes:
|
|
- wace-plm-project_data:/data_storage
|
|
- wace-plm-app_data:/path/inside/container
|
|
- ./logs:/usr/local/tomcat/logs
|
|
- ./WebContent:/usr/local/tomcat/webapps/ROOT
|
|
depends_on:
|
|
wace-plm-db:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
networks:
|
|
- wace-plm-network
|
|
|
|
wace-plm-db:
|
|
image: postgres:16-alpine
|
|
container_name: wace-plm-db-standalone
|
|
environment:
|
|
POSTGRES_DB: waceplm
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: waceplm0909!!
|
|
POSTGRES_INITDB_ARGS: "--encoding=UTF8 --locale=C"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./db/00-create-roles.sh:/docker-entrypoint-initdb.d/00-create-roles.sh
|
|
- ./db/dbexport.pgsql:/docker-entrypoint-initdb.d/01-dbexport.sql
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres -d waceplm"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
networks:
|
|
- wace-plm-network
|
|
|
|
volumes:
|
|
wace-plm-project_data:
|
|
driver: local
|
|
wace-plm-app_data:
|
|
driver: local
|
|
postgres_data:
|
|
driver: local
|
|
|
|
networks:
|
|
wace-plm-network:
|
|
driver: bridge
|