-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
47 lines (44 loc) · 1.31 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
version: "3"
services:
database:
container_name: ${MYSQL_NAME}
build:
context: ./mysql
args:
- MYSQL_VERSION=${MYSQL_VERSION}
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- TZ=${WORKSPACE_TIMEZONE}
volumes:
- ${PUTI_ROOT}${MYSQL_DATA_PATH}:/var/lib/mysql
- ${MYSQL_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
- ${PUTI_ROOT}${MYSQL_LOG_PATH}:/var/log/mysql
ports:
- "${MYSQL_PORT}:3306"
restart: always
networks:
- db
# this entrypoint and command can rewrite by entrypoint script
entrypoint: ""
command: bash -c "chown -R mysql:mysql /var/log/mysql && exec /entrypoint.sh mysqld"
puti:
container_name: ${PUTI_NAME}
image: puti/puti:${PUTI_VERSION}
depends_on:
- database
volumes:
- ${PUTI_ROOT}${PUTI_DATA_PATH}:/data/puti
- ${PUTI_ROOT}${PUTI_LOG_PATH}:/data/logs/puti
ports:
- "${PUTI_HTTP_PORT_OUT}:${PUTI_HTTP_PORT}"
- "${PUTI_HTTPS_PORT_OUT}:${PUTI_HTTPS_PORT}"
restart: always
networks:
- db
entrypoint: ["/usr/local/bin/wait-for-db.sh", "database:3306", "--", "docker-entrypoint.sh"]
command: ["puti"]
networks:
db: