-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
61 lines (59 loc) · 1.49 KB
/
docker-compose.yml
File metadata and controls
61 lines (59 loc) · 1.49 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
services:
#streamlit
streamlit:
build:
context: ./app # Point to the app directory with the Dockerfile
dockerfile: Dockerfile
container_name: streamlit
volumes:
- ./app:/app
working_dir: /app
ports:
- ${ST_PORT_HOST}:${ST_PORT_CONT}
environment:
- DB_HOST=db
- DB_PORT=${DB_PORT_CONT}
- DB_USER=${MARIADB_USER}
- DB_PASSWORD=${MARIADB_PASSWORD}
- DB_NAME=${ST_DB_SELECTED}
depends_on:
- db
# database
db:
container_name: database
image: mariadb:lts-ubi
command:
- --max_allowed_packet=107374182400 # 100GB
- --max_connections=20000
- --innodb_buffer_pool_size=256M
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD}
MARIADB_USER: ${MARIADB_USER}
MARIADB_PASSWORD: ${MARIADB_PASSWORD}
ports:
- ${DB_PORT_HOST}:${DB_PORT_CONT}
volumes:
# bind-mount the sql files that should be run while initialising
- ./init:/docker-entrypoint-initdb.d
healthcheck: # define health-check that service is ready
interval: 2s
retries: 20
test:
[
"CMD",
"healthcheck.sh",
"--su-mysql",
"--connect",
"--innodb_initialized"
]
timeout: 30s
# administration
adminer:
container_name: adm
image: adminer:latest
environment:
ADMINER_DEFAULT_SERVER: db
restart: always
ports:
- ${ADMINER_PORT_HOST}:${ADMINER_PORT_CONT}