-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
53 lines (48 loc) · 1.2 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
52
53
version: "3"
services:
yatb:
build:
dockerfile: Dockerfile.production
context: .
command: "--workers=4 --bind=0.0.0.0:80 --forwarded-allow-ips='*'"
# --log-level=warning --host 0.0.0.0 --port 80 --proxy-headers --forwarded-allow-ips *"
# command: "--log-level=warning --host 0.0.0.0 --port 80"
restart: always
volumes:
- ./yatb.env:/usr/src/yatb.env:ro
- ./logs:/usr/src/logs
environment:
- "MONGO=mongodb://root:root@mongo:27017"
depends_on:
- mongo
expose:
- 80
mongo:
image: mongo:7.0
environment:
- "MONGO_INITDB_ROOT_USERNAME=root"
- "MONGO_INITDB_ROOT_PASSWORD=root"
volumes:
- "yatb_data:/data/db"
expose:
- 27017
caddy:
image: caddy:2.7
restart: always
volumes:
- "./app/view/static/:/usr/caddy/static/:ro"
- "./nginx/Caddyfile:/etc/caddy/Caddyfile:ro"
- "caddy_data:/data"
ports:
- "127.0.0.1:8080:80"
# nginx:
# image: nginx
# restart: always
# volumes:
# - ./app/view/static/:/usr/static/
# - ./nginx/yatb.conf:/etc/nginx/conf.d/default.conf
# ports:
# - "127.0.0.1:8080:80"
volumes:
yatb_data:
caddy_data: