-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
83 lines (79 loc) · 2.51 KB
/
compose.yaml
File metadata and controls
83 lines (79 loc) · 2.51 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
services:
proxy:
image: nginx:1.24.0
restart: unless-stopped
volumes:
# Needs `127.0.0.1 www.example.com` in /etc/hosts
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx-selfsigned.crt:/etc/ssl/certs/nginx-selfsigned.crt:ro
- ./nginx-selfsigned.key:/etc/ssl/private/nginx-selfsigned.key:ro
depends_on:
jatos:
condition: service_healthy
ports:
- 80:80
- 443:443
jatos:
image: jatos/jatos:${JATOS_VERSION:-latest}
restart: unless-stopped
ports:
- 9001:9000
deploy:
resources:
limits:
cpus: ${JATOS_CPUS:-8.0}
memory: ${JATOS_MEM:-16G}
healthcheck:
# If you have a base path (if you set 'jatos.urlBasePath') you have to change the URL path here
test: ["CMD", "curl", "-f", "http://localhost:9000/ping"]
interval: 2s
timeout: 2s
retries: 1000
start_period: 10s
environment:
JATOS_DB_URL: 'jdbc:mysql://db/jatos?characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC'
JATOS_DB_USERNAME: 'jatosuser'
JATOS_DB_PASSWORD: 'abc123'
JATOS_DB_DRIVER: 'com.mysql.cj.jdbc.Driver'
JATOS_SECRET: 'my-secret-secret'
JATOS_DB_CONNECTIONPOOL_SIZE: ${JATOS_DB_CONNECTIONPOOL_SIZE:-50}
JATOS_THREADPOOL_SIZE: ${JATOS_THREADPOOL_SIZE:-75}
command:
# If you're running multiple JATOS instances
#- '-Djatos.multiNode=true'
# Get JATOS' logs to the stdout, e.g. for debugging
#- '-Djatos.logs.appender=ASYNCSTDOUT'
- -J-Xmx${JAVA_XMX:-15G}
volumes:
- ./jatos-logs/:/opt/jatos/logs
- ./jatos-data/:/opt/jatos_data
# Configure JATOS by binding a jatos.conf
- ./jatos.conf:/opt/jatos/conf/jatos.conf:ro
db:
image: mysql:8.0.32-debian
restart: unless-stopped
ports:
- "3307:3306"
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
interval: 2s
timeout: 2s
retries: 30
environment:
MYSQL_DATABASE: 'jatos'
MYSQL_USER: 'jatosuser'
MYSQL_PASSWORD: 'abc123'
MYSQL_ROOT_PASSWORD: 'abc123'
#command:
# Deactivate MySQL's binary log (https://www.jatos.org/JATOS-with-MySQL.html)
#- '--skip-log-bin'
cap_add:
# Fix "mbind: Operation not permitted" (https://stackoverflow.com/q/55559386/1278769)
- SYS_NICE
volumes:
- jatos-db:/var/lib/mysql
- ./mysql.conf:/etc/my.cnf:ro
volumes:
jatos-data:
jatos-logs:
jatos-db: