forked from PalisadoesFoundation/talawa-api
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.dev.yaml
131 lines (123 loc) · 2.91 KB
/
docker-compose.dev.yaml
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
version: "3.8"
services:
mongo:
# No light weight image is available for mongo
image: mongo
container_name: mongo
restart: unless-stopped
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.runCommand({ ping: 1 }).ok"]
interval: 10s
timeout: 5s
retries: 10
deploy:
resources:
limits:
memory: 1G
cpus: "1.0"
ports:
- "27017:27017"
volumes:
- mongo_data:/data/db
- ./scripts/docker/init-mongo.sh:/init-mongo.sh
networks:
- talawa-network
entrypoint: ["/bin/bash", "/init-mongo.sh"]
redis-stack-server:
image: redis:8.0-M02-alpine
ports:
- 6379:6379
deploy:
resources:
limits:
memory: 512M
cpus: "0.5"
volumes:
- redis-data:/data/redis
networks:
- talawa-network
minio:
# No light weight image is available
image: minio/minio
ports:
- "9000:9000"
- "9001:9001"
environment:
- MINIO_ROOT_USER=${MINIO_ROOT_USER}
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}
command: server /data --console-address ":9001"
deploy:
resources:
limits:
memory: 512M
cpus: "0.5"
volumes:
- minio-data:/data
networks:
- talawa-network
talawa-api-dev:
build:
context: .
dockerfile: Dockerfile.dev
container_name: talawa-api-dev
ports:
- "4000:4000"
volumes:
- /usr/src/app/node_modules
- ./scripts/docker/init-data-import.sh:/init-data-import.sh
depends_on:
mongo:
condition: service_healthy
redis-stack-server:
condition: service_started
minio:
condition: service_started
environment:
- MONGO_DB_URL=mongodb://mongo:27017/talawa-api?replicaSet=rs0
- NODE_ENV=development
- REDIS_HOST=redis-stack-server
- REDIS_PORT=6379
- ACCESS_TOKEN_SECRET=${ACCESS_TOKEN_SECRET}
- REFRESH_TOKEN_SECRET=${REFRESH_TOKEN_SECRET}
- MINIO_ROOT_USER=${MINIO_ROOT_USER}
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}
deploy:
resources:
limits:
memory: 1G
cpus: "1.0"
entrypoint: ["/bin/bash", "/init-data-import.sh"]
networks:
- talawa-network
caddy:
image: caddy/caddy:2.9.1-alpine
container_name: caddy-service
restart: unless-stopped
ports:
- "9080:9080"
- "9443:9443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- $PWD/site:/srv
- caddy_data:/data
- caddy_config:/config
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4000/graphql"]
interval: 10s
timeout: 5s
retries: 5
deploy:
resources:
limits:
memory: 256M
cpus: "0.25"
networks:
- talawa-network
volumes:
redis-data:
minio-data:
mongo_data:
caddy_data:
caddy_config:
networks:
talawa-network: