-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.prod.yml
95 lines (88 loc) · 2.11 KB
/
docker-compose.prod.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
version: "3.7"
networks:
frontend:
external: true
cake_backend:
internal: true
services:
app:
build:
# args:
# user: cake
# uid: 1000
context: ./
dockerfile: ./docker/app/Dockerfile
# image: ghcr.io/maymeow/cake-notify/cake-notify:latest
env_file: .env
container_name: app
restart: unless-stopped
working_dir: /var/www/
networks:
- frontend
- cake_backend
depends_on:
- db
- redis
volumes:
- /var/www
# For sqlite uncomment following line
# - ./app.sq3:/app.sq3
db:
image: postgres:12.4
container_name: db
networks:
- cake_backend
restart: unless-stopped
volumes:
- ./data/db:/var/lib/postgresql/data
env_file: .env
nginx:
build:
context: ./docker/nginx
dockerfile: Dockerfile
container_name: nginx
networks:
- cake_backend
- frontend
volumes_from:
- app
# ports:
# - "8088:80"
restart: unless-stopped
depends_on:
- app
- db
- redis
labels:
- "traefik.enable=true"
- "traefik.http.routers.cake.rule=Host(`cake.domain.sk`)"
- "traefik.http.routers.cake.entrypoints=web,websecure"
- "traefik.http.routers.cake.tls.certresolver=le"
- "traefik.http.routers.cake.tls.options=mytls@file"
- "traefik.http.services.cake.loadbalancer.server.port=80"
- "traefik.http.routers.cake.service=cake"
- "traefik.docker.network=frontend"
redis:
image: "redis:alpine"
container_name: redis
networks:
- cake_backend
# if you need graphic acces to application database
# adminer:
# image: adminer
# networks:
# - frontend
# restart: unless-stopped
# If you need/want use minio S3 storage uncomment following
# minio:
# image: minio/minio:RELEASE.2021-08-05T22-01-19Z
# volumes:
# - minio_data:/data
# env_file: .env
# networks:
# - cake_backend
# command: server /data --console-address :9001
# Optional: uncomment if you want to expose ports
# ports:
# - "9000:9000"
# - "9001:9001"