-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
51 lines (47 loc) · 1.18 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
49
50
51
version: '3.8'
services:
fastapi-app:
build:
context: .
dockerfile: Dockerfile
target: runtime
image: ${IMAGE_NAME}-server:latest
container_name: ${IMAGE_NAME}-server
ports:
- "${EXTERNAL_PORT}:8080"
volumes:
- ./cache:/app/cache
- ./.env:/app/.env
restart: unless-stopped
depends_on:
- scheduled-tasks
extra_hosts:
- "host.docker.internal:host-gateway"
redis:
container_name: ${IMAGE_NAME}-redis
image: redis:latest
volumes:
- /data/docker-service/redis_cache/${IMAGE_NAME}:/data
restart: unless-stopped
scheduled-tasks:
build:
context: .
dockerfile: Dockerfile-scheduled-tasks
target: runtime
image: scheduled_tasks
container_name: ${IMAGE_NAME}-scheduled-tasks
restart: unless-stopped
volumes:
- ./cache:/app/cache
- ./.env:/app/.env
depends_on:
- redis
extra_hosts:
- "host.docker.internal:host-gateway"
tunnel:
container_name: ${IMAGE_NAME}-tunnel
image: cloudflare/cloudflared:latest
restart: unless-stopped
command: tunnel --no-autoupdate run
environment:
- TUNNEL_TOKEN=${TUNNEL_TOKEN}