-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
48 lines (44 loc) · 1.04 KB
/
docker-compose.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
version: '3.8'
services:
app.demo.redis:
image: app.demo.redis:${LATEST_COMMIT_DEMO_REDIS}
container_name: app.demo.redis
build:
dockerfile: Dockerfile
context: .
ports:
- 8080:8080
networks:
- backend.demo.redis
restart: unless-stopped
volumes:
# create a volume and bind logs folder
- app.demo.redis.data:/logs
# mount config file in the container
- ./config.yml:/config.yml:ro
env_file:
- ./config.env
links:
- db.demo.redis:db.demo.redis
depends_on:
- db.demo.redis
db.demo.redis:
image: redis:7.0.10-alpine
container_name: db.demo.redis
restart: unless-stopped
ports:
- 6379:6379
command: redis-server /usr/local/etc/redis/redis.conf
networks:
- backend.demo.redis
volumes:
- ./redis.conf:/usr/local/etc/redis/redis.conf:ro
- db.demo.redis.data:/data
networks:
backend.demo.redis:
driver: bridge
volumes:
app.demo.redis.data:
driver: local
db.demo.redis.data:
driver: local