-
Notifications
You must be signed in to change notification settings - Fork 193
Expand file tree
/
Copy pathdocker-compose.example
More file actions
130 lines (125 loc) · 2.9 KB
/
docker-compose.example
File metadata and controls
130 lines (125 loc) · 2.9 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
services:
postgres:
image: postgres:17-alpine
container_name: postgres
env_file:
- .env
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- ./.postgres_data:/var/lib/postgresql/data
ports:
- "${POSTGRES_PORT}:5432"
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 5
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
compress: "true"
networks:
- app_network
pgadmin:
image: dpage/pgadmin4
container_name: pgadmin
env_file:
- .env
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
volumes:
- ./.pgadmin_data:/var/lib/pgadmin
ports:
- "${PGADMIN_PORT}:80"
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
compress: "true"
networks:
- app_network
redis:
image: redis:7.4-alpine
container_name: redis
env_file:
- .env
volumes:
- ./.redis_data:/data
restart: unless-stopped
ports:
- "${REDIS_PORT}:6379"
command: ["redis-server", "--appendonly", "yes", "--requirepass", "${REDIS_PASSWORD}"]
healthcheck:
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD}", "PING"]
interval: 10s
timeout: 3s
retries: 3
start_period: 5s
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
compress: "true"
nats:
image: nats:latest
container_name: nats
entrypoint: /nats-server
command: "-c /config/server.conf"
ports:
- "${NATS_PORT}:4222"
- "${NATS_MONITORING_PORT}:8222"
volumes:
- ./nats_broker/.nats_data:/data
- ./nats_broker/config/server.conf:/config/server.conf
healthcheck:
test: ["CMD", "nats-server", "-sl"]
interval: 5s
timeout: 3s
retries: 5
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
compress: "true"
networks:
- app_network
nats-nui:
image: ghcr.io/nats-nui/nui:latest
container_name: nats-nui
env_file:
- .env
ports:
- "${NUI_PORT}:31311"
environment:
NUI_USERNAME: ${NUI_USERNAME}
NUI_PASSWORD: ${NUI_PASSWORD}
volumes:
- ./.nui_data/db:/db
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
compress: "true"
networks:
- app_network
depends_on:
nats:
condition: service_healthy
networks:
app_network:
name: app_network