forked from certego/BuffaLogs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
152 lines (142 loc) · 4.07 KB
/
docker-compose.yaml
File metadata and controls
152 lines (142 loc) · 4.07 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
services:
buffalogs_postgres:
container_name: buffalogs_postgres
image: postgres:15-alpine
hostname: postgres
networks:
- buffalogs_network
environment:
POSTGRES_USER: default_user
POSTGRES_PASSWORD: password
POSTGRES_DB: buffalogs
volumes:
- buffalogs_postgres_data:/var/lib/postgresql/data
ports:
- "5433:5432"
healthcheck:
test: ["CMD", "pg_isready", "-U", "default_user", "-d", "buffalogs"]
interval: 10s
timeout: 5s
retries: 5
buffalogs_nginx:
container_name: buffalogs_nginx
image: nginx:mainline-alpine
hostname: nginx
networks:
- buffalogs_network
depends_on:
- buffalogs
volumes:
- ./config/nginx/conf.d:/etc/nginx/conf.d:ro
# - ./config/nginx/certs:/etc/nginx/certs:ro
- buffalogs_django_static:/var/www:ro
- buffalogs_nginx_sockets:/var/run/nginx-sockets
- buffalogs_nginx_logs:/var/log/nginx:rw
ports:
- "80:80"
- "8000:80"
# - "443:443"
buffalogs:
container_name: buffalogs
build:
context: .
dockerfile: build/Dockerfile
image: certego/buffalogs
hostname: buffalogs
networks:
- buffalogs_network
env_file:
- config/buffalogs/buffalogs.env
volumes:
- buffalogs_django_static:/var/www
- buffalogs_nginx_sockets:/var/run/nginx-sockets
- ./config:/opt/certego/config:ro
depends_on:
- buffalogs_postgres
- buffalogs_rabbitmq
buffalogs_rabbitmq:
container_name: buffalogs_rabbitmq
image: rabbitmq:3.13-management-alpine
hostname: rabbitmq
networks:
- buffalogs_network
volumes:
- ./config/rabbitmq:/etc/rabbitmq:ro
- buffalogs_rabbitmq_data:/var/lib/rabbitmq
expose:
- "5672"
- "15672"
healthcheck:
test: rabbitmqctl status
buffalogs_celery:
container_name: buffalogs_celery
image: buffalogs:latest
hostname: celery
networks:
- buffalogs_network
build:
context: .
dockerfile: build/Dockerfile
env_file:
- config/buffalogs/buffalogs.env
command:
- ./run_worker.sh
volumes:
- ./config:/opt/certego/config:ro
depends_on:
- buffalogs_postgres
- buffalogs_rabbitmq
buffalogs_celery_beat:
container_name: buffalogs_celery_beat
build:
context: .
dockerfile: build/Dockerfile
image: buffalogs:latest
hostname: celery_beat
networks:
- buffalogs_network
env_file:
- config/buffalogs/buffalogs.env
command:
- ./run_beat.sh
volumes:
- ./config:/opt/certego/config:ro
depends_on:
- buffalogs_postgres
- buffalogs_rabbitmq
buffalogs_frontend:
container_name: buffalogs_frontend
build:
context: ./frontend
dockerfile: Dockerfile
networks:
- buffalogs_network
ports:
- "3000:3000"
environment:
- NODE_ENV=development
volumes:
- ./frontend:/app
- /app/node_modules
stdin_open: true
tty: true
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 30s
timeout: 10s
retries: 3
volumes:
buffalogs_postgres_data:
driver: local
buffalogs_nginx_sockets:
driver: local
buffalogs_django_static:
driver: local
buffalogs_nginx_logs:
driver: local
buffalogs_rabbitmq_data:
driver: local
networks:
buffalogs_network:
driver: bridge
name: buffalogs_network