-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
60 lines (55 loc) · 1.58 KB
/
Copy pathdocker-compose.yml
File metadata and controls
60 lines (55 loc) · 1.58 KB
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
version: '3.9'
services:
server:
build:
context: .
dockerfile: Dockerfile
container_name: wheel_server
environment:
- DOMAIN=${DOMAIN}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- AWS_S3_BUCKET_NAME=${AWS_S3_BUCKET_NAME}
- AWS_S3_CLOUDFRONT=${AWS_S3_CLOUDFRONT}
ports:
- "55000:55000"
depends_on:
- db
db:
image: mysql:8.0
container_name: wheel_db
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-password}
MYSQL_DATABASE: ${MYSQL_DATABASE:-wheel_db}
MYSQL_USER: ${MYSQL_USER:-wheel}
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-password}
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql
nginx:
image: nginx:latest
container_name: nginx
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./data/nginx/conf.d:/etc/nginx/conf.d
# - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
- ./static:/usr/share/nginx/static:ro
depends_on:
- server
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
certbot:
image: certbot/certbot
restart: unless-stopped
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
volumes:
db_data: