-
Notifications
You must be signed in to change notification settings - Fork 18
/
compose.yaml
91 lines (84 loc) · 1.74 KB
/
compose.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
services:
ci:
image: ci
build:
context: .
dockerfile: Dockerfile
ports:
- 3000:3000
tty: true
links:
- mongo
- redis
depends_on:
- mongo
- redis
networks:
- back-tier
environment:
- MONGODB_URL=mongodb://root:rootpasswd@mongo:27017/mydb
- REDIS_URL=redis://redis:6379
caddy:
image: caddy:2.7-alpine
restart: unless-stopped
cap_add:
- NET_ADMIN
ports:
- '80:80'
- '443:443'
- '443:443/udp'
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
mongo:
image: mongo:7
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: rootpasswd
MONGO_INITDB_DATABASE: mydb
ports:
- 27017:27017
volumes:
- mongo-data:/data
- ./db:/docker-entrypoint-initdb.d:ro
networks:
- back-tier
redis:
restart: always
image: redis:alpine
command: redis-server --bind redis --port 6379 --save 60 1 --loglevel warning
ports:
- 6379:6379
volumes:
- redis-data:/data
networks:
- back-tier
local-mongo:
image: mongo:7
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: rootpasswd
MONGO_INITDB_DATABASE: mydb
ports:
- 27017:27017
volumes:
- mongo-data:/data
- ./db:/docker-entrypoint-initdb.d:ro
local-redis:
restart: always
image: redis:alpine
command: redis-server --save 60 1 --loglevel warning
ports:
- 6379:6379
volumes:
- redis-data:/data
networks:
back-tier:
volumes:
caddy_data:
caddy_config:
mongo-data:
redis-data: