forked from 4x99/code6
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
45 lines (45 loc) · 982 Bytes
/
docker-compose.yaml
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
version: "3.9"
services:
mysql:
image: mysql/mysql-server:5.7
container_name: code6-mysql
restart: always
env_file:
- .env.docker-compose
networks:
- code6-network
ports:
- ${MYSQL_PORT}:3306
volumes:
- /etc/localtime:/etc/localtime:ro
- ${MYSQL_VOLUME_PATH}:/var/lib/mysql
healthcheck:
test: mysql ${MYSQL_DATABASE} -u${MYSQL_USER} -p${MYSQL_PASSWORD} -e 'SELECT 1'
interval: 5s
retries: 10
start_period: 60s
code6:
image: code6
build:
context: .
dockerfile: Dockerfile
container_name: code6-server
depends_on:
mysql:
condition: service_healthy
restart: always
env_file:
- .env.docker-compose
environment:
MYSQL_HOST: mysql
MYSQL_PORT: 3306
MYSQL_USERNAME: ${MYSQL_USER}
ports:
- ${PORT}:80
networks:
- code6-network
links:
- mysql
networks:
code6-network:
name: code6-network