-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
74 lines (69 loc) · 1.35 KB
/
docker-compose.yml
File metadata and controls
74 lines (69 loc) · 1.35 KB
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
services:
api:
build:
context: .
dockerfile: dockerfile
restart: always
deploy:
mode: replicated
replicas: 3
expose:
- "${APP_PORT}"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
volumes:
- ./:/cdn
depends_on:
- minio
- redis
networks:
- cdn
# Load balancer for API instances
nginx:
image: nginx:alpine
container_name: cdn-nginx
restart: always
ports:
- "${APP_PORT}:80"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
depends_on:
- api
networks:
- cdn
minio:
# image: minio/minio:RELEASE.2022-10-24T18-35-07Z
image: minio/minio
container_name: cdn-minio
restart: always
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio:/var/lib/minio
environment:
MINIO_ROOT_USER: "${MINIO_ROOT_USER}"
MINIO_ROOT_PASSWORD: "${MINIO_ROOT_PASSWORD}"
command: server --console-address ":9001" /var/lib/minio
networks:
- cdn
redis:
image: redis:7.2-alpine
container_name: cdn-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: redis-server --appendonly yes
networks:
- cdn
networks:
cdn:
driver: bridge
volumes:
minio:
redis_data:
driver: local