-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcompose.yaml
88 lines (83 loc) · 2.16 KB
/
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Docker Compose definition for local development.
# Launches a MariaDB container with a volume for permanent storage,
# and the Techscore web application container for serving traffic
---
services:
techscore:
build: .
ports:
- "8080:80"
networks:
- backend
volumes:
- ./lib:/var/www/lib
- ./bin:/var/www/bin
- ./src:/var/www/src
environment:
DB_ROOT_USER: 'root'
DB_ROOT_PASS: 'db-pw'
SQL_USER: 'root'
SQL_PASS: 'db-pw'
SQL_DB: 'techscore'
SQL_HOST: 'database'
SQL_PORT: '3306'
APP_HOME: 'localhost'
PUB_HOME: 'scores.local'
ADMIN_MAIL: '[email protected]'
ADMIN_PASS: 'sailor1'
PASSWORD_SALT: '2f72cc11a6fcd0271ecef8c61056ee1eb1243be3805bf9a9df98f92f7636b05c'
depends_on:
database:
condition: service_healthy
ts-processor:
build: .
command: 'techscore-processor-foreground'
networks:
- backend
volumes:
- ./lib:/var/www/lib
- ./bin:/var/www/bin
- ./src:/var/www/src
- ./html:/var/www/public-html
environment:
DB_ROOT_USER: 'root'
DB_ROOT_PASS: 'db-pw'
SQL_USER: 'root'
SQL_PASS: 'db-pw'
SQL_DB: 'techscore'
SQL_HOST: 'database'
SQL_PORT: '3306'
APP_HOME: 'ts.local'
PUB_HOME: 'scores.local'
ADMIN_MAIL: '[email protected]'
ADMIN_PASS: 'sailor1'
PASSWORD_SALT: '2f72cc11a6fcd0271ecef8c61056ee1eb1243be3805bf9a9df98f92f7636b05c'
depends_on:
database:
condition: service_healthy
database:
image: mariadb:lts
volumes:
- $HOME/openweb/docker/ts-data:/var/lib/mysql:Z
container_name: 'database'
environment:
MARIADB_ROOT_PASSWORD: db-pw
MARIADB_DATABASE: techscore
# https://mariadb.com/kb/en/using-healthcheck-sh/
healthcheck:
interval: 30s
retries: 3
test:
[
"CMD",
"healthcheck.sh",
"--su-mysql",
"--connect",
"--innodb_initialized"
]
timeout: 30s
networks:
- backend
networks:
# The presence of these objects is sufficient to define them
backend: {}