-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
46 lines (42 loc) · 1.05 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
# development docker-compose
version: "3"
services:
database:
image: mariadb
restart: always
environment:
# So hard to find and yet this makes SQL INSERT queries suuport UTF-8
LANG: C.UTF-8
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: lotr
# Set MariaDB to use utf8 correctly on server side
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max_allowed_packet=32505856
networks:
- backend
volumes:
- ./database/data:/var/lib/mysql
- ./database/init:/docker-entrypoint-initdb.d
- ./database/sql_scripts:/sql_scripts
ports:
- 3306:3306
webserver:
depends_on:
- database
build: ./webserver
restart: always
# Python encoding for correct utf-8 json behaviour
environment:
- WEBSERVER_PORT=3000
- PYTHONIOENCODING=utf8
volumes:
- ./build:/app/build
ports:
- 3000:3000
networks:
- backend
- external
networks:
backend:
driver: bridge
external:
driver: bridge