This repository was archived by the owner on Apr 1, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
69 lines (68 loc) · 1.98 KB
/
docker-compose.yaml
File metadata and controls
69 lines (68 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
services:
db:
image: postgres:16-alpine # Using a lightweight Alpine-based image for PostgreSQL 16
restart: always # Ensure the container restarts if it crashes
environment:
POSTGRES_USER: dcs_owner # Database username
POSTGRES_PASSWORD: dcs_password # Database password
POSTGRES_DB: dcs # Name of the database to create
ports:
- "5432:5432" # Map host port 5432 to container port 5432
volumes:
- db_data:/var/lib/postgresql/data # Persistent storage for database data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U dcs_owner -d dcs -h localhost"]
interval: 5s
timeout: 3s
retries: 20
start_period: 10s
migration:
image: ghcr.io/opendcs/compdepends:7.5.1-RC13
environment:
- DCS_OWNER=dcs_owner
- DCS_OWNER_PASS=dcs_password
- DCS_USER=app
- DCS_PASS=app_pass
- DCS_IMPLEMENTATION=OpenDCS-Postgres
- DATABASE_URL=jdbc:postgresql://db:5432/dcs
- placeholder_NUM_TS_TABLES=1
- placeholder_NUM_TEXT_TABLES=1
command: ["/schema.sh"]
volumes:
- ./compose_files/schema.sh:/schema.sh:ro
restart: no
depends_on:
db:
condition: service_healthy
api:
build:
context: .
ports:
- 7000:7000
environment:
- DB_DRIVER_CLASS=org.postgresql.Driver
- DB_USERNAME=app
- DB_PASSWORD=app_pass
- DB_VALIDATION_QUERY=SELECT 1
- DB_URL=jdbc:postgresql://db:5432/dcs
- DB_MAX_CONNECTIONS=10
- DB_MAX_IDLE=5
- DB_MIN_IDLE=1
depends_on:
migration:
condition: service_completed_successfully
pgadmin:
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: user@exaple.com
PGADMIN_DEFAULT_PASSWORD: admin123
ports:
- "5050:80"
depends_on:
db:
condition: service_healthy
restart: "unless-stopped"
volumes:
- ./compose_files/servers.json:/tmp/servers.json
volumes:
db_data: # Define the named volume for data persistence