-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (44 loc) · 964 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
46 lines (44 loc) · 964 Bytes
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
version: "3.9"
services:
rabbitmq:
restart: always
image: "rabbitmq:3.12.13-alpine"
environment:
RABBITMQ_DEFAULT_USER: "rabbitmq"
RABBITMQ_DEFAULT_PASS: "rabbitmq"
volumes:
- ./rabbitmq-data:/var/lib/rabbitmq
healthcheck:
test: ["CMD", "rabbitmqctl", "status"]
interval: 30s
timeout: 30s
retries: 3
postgres:
image: postgres:17-alpine3.20
restart: always
env_file:
- .env
volumes:
- ./psql-data:/var/lib/postgresql/data
healthcheck:
test: "pg_isready -U postgres"
interval: 30s
timeout: 30s
retries: 3
api:
restart: always
build:
context: .
dockerfile: Dockerfile
ports:
- "3000:3000"
env_file:
- .env
depends_on:
- rabbitmq
- postgres
entrypoint: ["./wait-for-it.sh", "postgres:5432", "--", "/app/start.sh"]
command: ["/app/server"]
volumes:
rabbitmq_data:
psql_data: