-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.build.prod.yml
69 lines (69 loc) · 2.09 KB
/
docker-compose.build.prod.yml
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:
backend:
image: lucasboillot/wildtransfer-backend
build:
dockerfile: Dockerfile.prod
env_file:
- .env
healthcheck:
test: 'curl --fail --request POST --header ''content-type: application/json'' --url ''http://localhost:4000/graphql'' --data ''{"query":"query { __typename }"}'' || exit 1'
interval: 1s
timeout: 2s
retries: 100
depends_on:
db:
condition: service_healthy
frontend:
image: lucasboillot/wildtransfer-frontend
depends_on:
backend:
condition: service_healthy
healthcheck:
test: "curl --fail --request GET --url 'http://localhost:5173' || exit 1"
interval: 1s
timeout: 2s
retries: 100
db:
image: postgres:16
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d postgres -U postgres" ]
interval: 1s
timeout: 2s
retries: 100
environment:
POSTGRES_PASSWORD: postgres
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
- ./postgres-data/data:/var/lib/postgresql/data
files:
image: lucasboillot/wildtransfer-files
build:
dockerfile: Dockerfile.prod
env_file:
- .env
healthcheck:
test: "curl --fail --request GET --url 'http://localhost:3000' || exit 1"
interval: 1s
timeout: 2s
retries: 100
apigateway:
image: nginx
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
depends_on:
backend:
condition: service_healthy
frontend:
condition: service_healthy
files:
condition: service_healthy
ports:
- ${GATEWAY_PORT:-8000}:80
redis:
image: redis
redis-commander:
image: rediscommander/redis-commander
environment:
- REDIS_HOSTS=redis
ports:
- "8081:8081"