Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
81 lines (77 loc) · 2.36 KB
/
Copy pathdocker-compose.yml
File metadata and controls
81 lines (77 loc) · 2.36 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
70
71
72
73
74
75
76
77
78
79
80
81
services:
trustpoint:
build:
context: .
dockerfile: docker/trustpoint/Dockerfile
image: trustpointproject/trustpoint:latest
container_name: trustpoint
restart: unless-stopped
ports:
- "${TP_HTTP_PORT:-80}:80"
- "${TP_HTTPS_PORT:-443}:443"
extra_hosts:
- "host.docker.internal:host-gateway"
env_file:
- .env
environment:
TRUSTPOINT_PHASE: "${TRUSTPOINT_PHASE:-auto}"
POSTGRES_DB: "${POSTGRES_DB:-trustpoint_db}"
DATABASE_USER: "${DATABASE_USER:-admin}"
DATABASE_PASSWORD: "${DATABASE_PASSWORD:-testing321}"
DATABASE_HOST: "${DATABASE_HOST:-postgres}"
DATABASE_PORT: "${DATABASE_PORT:-5432}"
volumes:
- trustpoint_bootstrap:/var/lib/trustpoint/bootstrap
healthcheck:
test: ["CMD-SHELL", "curl -fsk --max-time 5 https://localhost/ > /dev/null"]
interval: 30s
timeout: 10s
retries: 3
start_period: 90s
trustpoint-worker:
build:
context: .
dockerfile: docker/trustpoint/Dockerfile
image: trustpointproject/trustpoint:latest
restart: on-failure
depends_on:
trustpoint:
condition: service_healthy
env_file:
- .env
environment:
TRUSTPOINT_PHASE: "${TRUSTPOINT_PHASE:-auto}"
POSTGRES_DB: "${POSTGRES_DB:-trustpoint_db}"
DATABASE_USER: "${DATABASE_USER:-admin}"
DATABASE_PASSWORD: "${DATABASE_PASSWORD:-testing321}"
DATABASE_HOST: "${DATABASE_HOST:-postgres}"
DATABASE_PORT: "${DATABASE_PORT:-5432}"
TRUSTPOINT_SERVICE_ROLE: "worker"
postgres:
build:
context: .
dockerfile: docker/db/Dockerfile
image: trustpointproject/postgres:latest
container_name: postgres
restart: unless-stopped
ports:
# Bind to loopback only – PostgreSQL must not be reachable from the network.
- "127.0.0.1:5432:5432"
volumes:
- postgres_data:/var/lib/postgresql
environment:
POSTGRES_USER: "${DATABASE_USER:-admin}"
POSTGRES_PASSWORD: "${DATABASE_PASSWORD:-testing321}"
POSTGRES_DB: "${POSTGRES_DB:-trustpoint_db}"
healthcheck:
test: ["CMD-SHELL", "pg_isready -h 127.0.0.1 -p 5432 -U \"$${POSTGRES_USER}\" -d \"$${POSTGRES_DB}\""]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
volumes:
postgres_data:
trustpoint_bootstrap:
networks:
default:
name: trustpoint-net