-
-
Notifications
You must be signed in to change notification settings - Fork 976
/
Copy pathdocker-compose.dev.yaml
93 lines (87 loc) · 1.98 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
services:
mongo:
image: mongo:latest
container_name: mongo
restart: unless-stopped
healthcheck:
test: mongosh --eval "try { rs.status().ok } catch (e) { 0 }"
interval: 30s
timeout: 5s
retries: 30
deploy:
resources:
limits:
memory: 1G
ports:
- "127.0.0.1:27017:27017"
volumes:
- mongo_data:/data/db
- ./init-mongo.sh:/init-mongo.sh
networks:
- talawa-network
entrypoint: ["/bin/bash", "/init-mongo.sh"]
redis-stack-server:
image: redis/redis-stack-server:latest
ports:
- 6379:6379
volumes:
- redis-data:/data/redis
networks:
- talawa-network
minio:
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"
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
- /usr/src/app/node_modules
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&directConnection=true
- REDIS_HOST=redis-stack-server
- REDIS_PORT=6379
networks:
- talawa-network
caddy:
image: caddy/caddy:2.2.1-alpine
container_name: caddy-service
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- $PWD/site:/srv
- caddy_data:/data
- caddy_config:/config
volumes:
redis-data:
minio-data:
mongo_data:
caddy_data:
caddy_config:
networks:
talawa-network:
driver: bridge