-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
107 lines (93 loc) · 2.69 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
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
version: "3.9"
services:
mysql:
restart: unless-stopped
image: mysql:5-debian
command: "--default-authentication-plugin=mysql_native_password"
volumes:
- ./docker/mysql/mysql.cnf:/etc/mysql/conf.d/custom.cnf
- antweb_database:/var/lib/mysql
environment:
TZ: America/Los_Angeles
MYSQL_RANDOM_ROOT_PASSWORD: "true"
expose:
- 3306
ports:
- "127.0.0.1:3306:3306"
caddy:
build:
context: .
dockerfile: docker/caddy/Dockerfile
# image: caddy:2
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./docker/caddy/Caddyfile:/etc/caddy/Caddyfile:ro
- ./docker/caddy/Caddyfile.common:/etc/caddy/Caddyfile.common:ro
- ./docker/caddy/logs:/var/log/caddy
- antweb_caddy_data:/data
- caddy_config:/config
environment:
IMAGE_BUCKET_DOMAIN: 'https://static.antweb.org'
api:
build:
context: .
dockerfile: docker/api/Dockerfile
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000"]
interval: 5m
timeout: 10s
retries: 3
start_period: 1m
depends_on:
- mysql
restart: unless-stopped
expose:
- 5000
antweb:
build:
context: .
dockerfile: docker/antweb/Dockerfile
args:
ENV: PROD
restart: unless-stopped
hostname: antweb
expose:
- 8009
ports:
- "127.0.0.1:8080:8080" # expose manager interface to local machine for monitoring
environment:
CATALINA_OPTS: "-XX:MaxRAMPercentage=40 -server -XX:+UseParallelGC"
extra_hosts:
- "antweb.org:127.0.0.1"
- "www.antweb.org:127.0.0.1"
# Mount the s3fs bucket for serving files
volumes:
- ${ANTWEB_BUCKET_PATH:-/mnt/antweb}:/mnt/antweb
- ${ANTWEB_BACKUP_PATH:-/mnt/backup}:/mnt/backup
- ./logs:/usr/local/tomcat/logs
- ./logbak:/usr/local/antweb/log/
- antweb_genInc:/usr/local/antweb/web/genInc
- ./build.xml:/antweb/deploy/build.xml
- ./bin:/antweb/deploy/bin
- ./doc:/antweb/deploy/doc
- ./etc:/antweb/deploy/etc
- ./META-INF:/antweb/deploy/META-INF
- ./src:/antweb/deploy/src
- ./test:/antweb/deploy/test
- ./web:/antweb/deploy/web
- ./WEB-INF:/antweb/deploy/WEB-INF
logging: # only store the last 50mb of logs. more may be captured in the mounted logs/ dir
driver: "json-file"
options:
max-file: '5'
max-size: '10m'
volumes:
antweb_genInc:
antweb_database:
external: true
caddy_config: # Don't need to prefix with antweb_ since it's an internal volume, docker-compose will do it automatically
antweb_caddy_data:
external: true