-
Notifications
You must be signed in to change notification settings - Fork 271
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (68 loc) · 1.5 KB
/
docker-compose.yml
File metadata and controls
72 lines (68 loc) · 1.5 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
61
62
63
64
65
66
67
68
69
70
71
72
version: "3.8"
services:
nginx:
build:
context: .
dockerfile: docker/Dockerfile.nginx
container_name: cqa-nginx
restart: unless-stopped
ports:
- "80:80"
- "443:443"
environment:
- LEGO_DOMAIN=${LEGO_DOMAIN:-}
- LEGO_EMAIL=${LEGO_EMAIL:-}
volumes:
- lego_certs:/etc/lego
- lego_webroot:/var/www/acme
depends_on:
- app
app:
build: .
container_name: cqa-app
restart: unless-stopped
expose:
- "8080"
env_file:
- .env
environment:
- APP_ENV=production
- DB_HOST=db
- DB_PORT=3306
- TZ=Asia/Ho_Chi_Minh
depends_on:
db:
condition: service_healthy
volumes:
- file_storage:/var/lib/cqa/files
tmpfs:
- /tmp
security_opt:
- no-new-privileges:true
db:
image: mysql:8.0
container_name: cqa-db
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${DB_NAME:-cqa}
MYSQL_USER: ${DB_USER:-cqa}
MYSQL_PASSWORD: ${DB_PASSWORD}
volumes:
- mysql_data:/var/lib/mysql
ports:
- "127.0.0.1:3306:3306"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
command: >
--character-set-server=utf8mb4
--collation-server=utf8mb4_unicode_ci
--default-authentication-plugin=mysql_native_password
volumes:
mysql_data:
file_storage:
lego_certs:
lego_webroot: