-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
111 lines (101 loc) · 3.68 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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# docker-compose.yml
version: '3.4'
services:
mariadb:
image: mariadb:10.5
restart: always
environment:
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: buildsysdb
MYSQL_USER: webuser
MYSQL_PASSWORD: websecret
networks:
texmlbus_net:
aliases:
- dbserver
# Uncomment, if you want to access db via local connection (e.g. IDE)
# you might need to explicitly set 127.0.0.1 in your configuration
# and not localhost there. Please also note the different port 3307 to
# not interfere with a local database installation.
#ports:
# - "127.0.0.1:${TEXMLBUS_MYSQL:-3307}:3306"
volumes:
- ./volume/db/init:/docker-entrypoint-initdb.d
# shared data volumes for mysql does still not work reliably
# on windows, must be volume that is managed by docker
- data-mysql:/var/lib/mysql
# work around innodb problem under windows
# uses its own volume, should be ok, now.
# command: 'mysqld --innodb-flush-method=fsync'
latexml_dmake:
image: stamer/latexml_dmake
environment:
DOCKERIZED: 1
MYSQL_USER: webuser
MYSQL_PASSWORD: websecret
MYSQL_HOST: dbserver
MYSQL_DATABASE: buildsysdb
networks:
texmlbus_net:
aliases:
- worker
volumes:
- ./volume/articles:/srv/texmlbus/articles
- ./volume/src:/srv/texmlbus/src
- optrun:/opt/run
texmlbus:
image: stamer/texmlbus
depends_on:
- mariadb
- latexml_dmake
environment:
DOCKERIZED: 1
APACHE_USER: dmake
CONTAINER_TIMEZONE: Europe/Berlin
MYSQL_USER: webuser
MYSQL_PASSWORD: websecret
MYSQL_HOST: dbserver
MYSQL_DATABASE: buildsysdb
PHP_UPLOAD_MAX_FILESIZE: 2G
PHP_POST_MAX_SIZE: 2G
# Sometimes a job (e.g. latexml) may run endlessly, limit
# the amount of time a job can run.
TIMEOUT_SECONDS: 1200
# Memory limits
# Version 3 of docker does not easily allow to set ulimits
# any more. But we also want to set limits regarding the real
# available memory, therefore only a percentage of can be set.
# It is still possible to set a fixed absolute limit though.
# The smaller result value will be set.
#
# Sometimes a job (e.g. latexml) may start to use huge amounts
# of memory. Here you can limit the amount, so the docker host
# does not become unresponsive.
# The percentage of available memory a worker may use.
# If you use several workers on the same host, you might
# want to decrease this value.
MEMLIMIT_PERCENT: 50
#MEMLIMIT_ABSOLUTE: 8G
networks:
texmlbus_net:
aliases:
- webserver
- dmake
- texmlbus
ports:
- "127.0.0.1:${TEXMLBUS_HTTP:-8080}:80"
- "127.0.0.1:${TEXMLBUS_HTTPS:-8443}:443"
volumes:
- ./volume/articles:/srv/texmlbus/articles
- ./volume/src:/srv/texmlbus/src
# have access to latexmls style files
- ./docker/LaTeXML:/opt/latexml
- optrun:/opt/run
command: '/bin/bash'
networks:
texmlbus_net:
volumes:
# shared by latexml-dmake and texmlbus
optrun:
# mysql database
data-mysql: