-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (66 loc) · 1.59 KB
/
docker-compose.yml
File metadata and controls
70 lines (66 loc) · 1.59 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
services:
mysql:
build:
context: .
dockerfile: Docker/Dockerfile.mysql
container_name: opentickets-mysql
restart: unless-stopped
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: opentickets_db
MYSQL_USER: ${MYSQL_APP_USER}
MYSQL_PASSWORD: ${MYSQL_APP_PASSWORD}
volumes:
- ./Docker/init-schema.sql:/docker-entrypoint-initdb.d/01-schema.sql
- mysql-data:/var/lib/mysql
networks:
- opentickets-network
healthcheck:
test: ["CMD", "mysql", "-u", "root", "-p${MYSQL_ROOT_PASSWORD}", "-e", "SELECT 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
backend:
build:
context: .
dockerfile: Docker/Dockerfile.backend
container_name: opentickets-backend
restart: unless-stopped
depends_on:
mysql:
condition: service_healthy
environment:
OT_DB_HOST: mysql
OT_DB_PORT: 3306
OT_DB_NAME: opentickets_db
OT_DB_USER: ${MYSQL_APP_USER}
OT_DB_PASSWORD: ${MYSQL_APP_PASSWORD}
OT_DB_POOL_NAME: opentickets_pool
networks:
- opentickets-network
nginx:
build:
context: .
dockerfile: Docker/Dockerfile.nginx
container_name: opentickets-nginx
restart: unless-stopped
ports:
- "80:80"
- "443:443"
depends_on:
- backend
volumes:
- certs:/etc/nginx/certs
networks:
- opentickets-network
volumes:
mysql-data:
driver: local
certs:
driver: local
networks:
opentickets-network:
driver: bridge