forked from QuivrHQ/quivr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.local.yml
112 lines (104 loc) · 2.85 KB
/
docker-compose.local.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
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
version: "3"
services:
traefik:
image: traefik:v2.7
container_name: traefik
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.myresolver.acme.tlschallenge=true"
- "--certificatesresolvers.myresolver.acme.email=${EMAIL}"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
ports:
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./letsencrypt:/letsencrypt"
restart: always
env_file:
- .env
frontend:
env_file:
- ./frontend/.env
build:
context: frontend
dockerfile: Dockerfile
container_name: web
restart: always
labels:
- "traefik.enable=true"
- "traefik.http.routers.frontend.rule=Host(`${DOMAIN_NAME}`)"
- "traefik.http.routers.frontend.entrypoints=websecure"
- "traefik.http.routers.frontend.tls.certresolver=myresolver"
depends_on:
- traefik
backend-core:
env_file:
- ./backend/.env
build:
context: backend
dockerfile: Dockerfile
container_name: backend-core
restart: always
volumes:
- ./backend/:/code/
depends_on:
- redis
- worker
- beat
- traefik
labels:
- "traefik.enable=true"
- "traefik.http.routers.backend-core.rule=Host(`${API_DOMAIN_NAME}`)"
- "traefik.http.routers.backend-core.entrypoints=websecure"
- "traefik.http.routers.backend-core.tls.certresolver=myresolver"
- "traefik.http.services.backend-core.loadbalancer.server.port=5050"
redis:
image: redis:latest
container_name: redis
restart: always
worker:
env_file:
- ./backend/.env
build:
context: backend
dockerfile: Dockerfile
container_name: worker
command: celery -A celery_worker worker -l info
restart: always
depends_on:
- redis
beat:
env_file:
- ./backend/.env
build:
context: backend
dockerfile: Dockerfile
container_name: beat
command: celery -A celery_worker beat -l info
restart: always
depends_on:
- redis
flower:
env_file:
- ./backend/.env
build:
context: backend
dockerfile: Dockerfile
container_name: flower
command: celery -A celery_worker flower -l info --port=5555
restart: always
depends_on:
- redis
- worker
- beat
labels:
- "traefik.enable=true"
- "traefik.http.routers.flower.rule=Host(`flower.${API_DOMAIN_NAME}`)"
- "traefik.http.routers.flower.entrypoints=websecure"
- "traefik.http.routers.flower.tls.certresolver=myresolver"
- "traefik.http.services.flower.loadbalancer.server.port=5555"