-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yaml
57 lines (57 loc) · 1.52 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
version: '3.6'
services:
db:
image: linuxserver/mariadb:110.4.12mariabionic-ls59
#command: mysqld --sql_mode=""
restart: always
ports:
- "${MYSQL_LISTEN_ADDR}:${MYSQL_LISTEN_PORT}:3306"
expose:
- ${MYSQL_LISTEN_PORT}
volumes:
- db_config:/config
- db:/var/lib/mysql
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
migration:
image: kcapp/api:$KCAPP_API_VERSION
command: [ "./wait-for-it.sh", "db:3306", "--", "./run_migrations.sh" ]
depends_on:
- db
environment:
DB_CONNECTION: "${MYSQL_USER}:${MYSQL_PASSWORD}@tcp(db:3306)/${MYSQL_DATABASE}?parseTime=true"
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
api:
image: kcapp/api:$KCAPP_API_VERSION
restart: always
ports:
- "${API_LISTEN_ADDR}:${API_LISTEN_PORT}:8001"
expose:
- ${API_LISTEN_PORT}
depends_on:
- migration
- db
command: [ "./wait-for-it.sh", "db:3306", "--", "/go/bin/api" ]
frontend:
image: kcapp/frontend:$KCAPP_FRONTEND_VERSION
restart: always
ports:
- "${KCAPP_FRONTEND_LISTEN_ADDR}:${KCAPP_FRONTEND_LISTEN_PORT}:3000"
expose:
- ${KCAPP_FRONTEND_LISTEN_PORT}
volumes:
- frontend_cache:/.cache
depends_on:
- api
environment:
- DEBUG=kcapp*
- KCAPP_API
- DISK_CACHE
volumes:
db:
db_config:
frontend_cache: