forked from noi-techpark/it.bz.opendatahub.kg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
138 lines (138 loc) · 4.99 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
version: "2.3"
volumes:
uploads:
data-admin:
data-end-user:
services:
nginx:
build:
context: infrastructure/docker/nginx
mem_limit: 128m
ports:
- ${HTTP_PORT}:8080
environment:
- UPSTREAM_SERVER=linkeddatahub
- UPSTREAM_HTTP_PORT=7070
- SERVER_NAME=${HOST}
- SERVER_HTTP_PORT=8080 # because of nginx-unprivileged
- MAX_BODY_SIZE=2097152
linkeddatahub:
build:
context: infrastructure/docker/linkeddatahub
args:
BASE_URI: ${PROTOCOL}://${HOST}${ABS_PATH} # will break with explicit port numbers
DEFAULT_ENDPOINT: https://sparql.opendatahub.testingmachine.eu/sparql
OWNER_GIVEN_NAME: ${OWNER_GIVEN_NAME}
OWNER_FAMILY_NAME: ${OWNER_FAMILY_NAME}
OWNER_ORG_UNIT: ${OWNER_ORG_UNIT}
OWNER_ORGANIZATION: ${OWNER_ORGANIZATION}
OWNER_LOCALITY: ${OWNER_LOCALITY}
OWNER_STATE_OR_PROVINCE: ${OWNER_STATE_OR_PROVINCE}
OWNER_COUNTRY_NAME: ${OWNER_COUNTRY_NAME}
OWNER_CERT_PASSWORD: ${OWNER_CERT_PASSWORD}
SECRETARY_CERT_PASSWORD: ${SECRETARY_CERT_PASSWORD}
mem_limit: 1872m
environment:
- CATALINA_OPTS=-XX:+UseContainerSupport -XX:MaxRAMPercentage=75 # heap will use up to 75% of container's RAM
- TZ="Europe/Copenhagen"
#- CATALINA_OPTS="-Duser.timezone=Europe/Copenhagen"
- PROXY_SCHEME=http
- PROXY_HOST=nginx
- PROXY_PORT=8080 # HTTP
- PROTOCOL=${PROTOCOL}
- HOST=${HOST}
- ABS_PATH=${ABS_PATH}
- HTTP_SCHEME=${PROTOCOL}
- HTTP_PORT=7070
- HTTP_PROXY_NAME=${HOST}
- HTTP_PROXY_PORT=${HTTPS_PORT}
- HTTP_REDIRECT_PORT=${HTTPS_PORT}
- HTTPS_PROXY_PORT=${HTTPS_PORT}
- HTTPS=false
- CLIENT_KEYSTORE_PASSWORD=${SECRETARY_CERT_PASSWORD}
- CLIENT_TRUSTSTORE_PASSWORD=LinkedDataHub
# - SELF_SIGNED_CERT=true # only on localhost
- SIGN_UP_CERT_VALIDITY=180
- IMPORT_KEEPALIVE=300000
- MAX_CONTENT_LENGTH=2097152
- MAIL_SMTP_HOST=email-server
- MAIL_SMTP_PORT=25
- MAIL_USER=linkeddatahub@localhost
- OWNER_MBOX=${OWNER_MBOX}
# - GOOGLE_CLIENT_ID=
# - GOOGLE_CLIENT_SECRET=
volumes:
- uploads:/var/www/linkeddatahub/uploads
fuseki-admin:
build:
context: infrastructure/docker/fuseki-admin
mem_limit: 1872m
user: root # otherwise fuseki user does not have permissions to the mounted folder which is owner by root
environment:
- JAVA_OPTIONS=-Xmx1700m -Xms1700m
volumes:
- data-admin:/fuseki/databases
command: [ "--config", "/fuseki/config.ttl" ]
fuseki-end-user:
build:
context: infrastructure/docker/fuseki-end-user
mem_limit: 2584m
user: root # otherwise fuseki user does not have permissions to the mounted folder which is owner by root
environment:
- JAVA_OPTIONS=-Xmx1900m -Xms1900m
volumes:
- data-end-user:/fuseki/databases
command: [ "--config", "/fuseki/config.ttl" ]
varnish-admin:
build:
context: infrastructure/docker/varnish-admin
mem_limit: 256m
user: root # otherwise varnish user does not have permissions to the mounted folder which is owner by root
depends_on:
- linkeddatahub
tmpfs: /var/lib/varnish:exec
environment:
- BACKEND_HOST=fuseki-admin
- BACKEND_PORT=3030
- CLIENT_HOST=linkeddatahub
- VARNISH_TTL=86400
- VARNISH_SIZE=1G
entrypoint: /bin/sh -c "envsubst < /etc/varnish/default.vcl.template > /etc/varnish/default.vcl && /usr/local/bin/docker-varnish-entrypoint"
varnish-end-user:
build:
context: infrastructure/docker/varnish-end-user
mem_limit: 256m
user: root # otherwise varnish user does not have permissions to the mounted folder which is owner by root
depends_on:
- linkeddatahub
tmpfs: /var/lib/varnish:exec
environment:
- BACKEND_HOST=fuseki-end-user
- BACKEND_PORT=3030
- CLIENT_HOST=linkeddatahub
- VARNISH_TTL=86400
- VARNISH_SIZE=1G
entrypoint: /bin/sh -c "envsubst < /etc/varnish/default.vcl.template > /etc/varnish/default.vcl && /usr/local/bin/docker-varnish-entrypoint"
#####################
## CUSTOM SERVICES ##
#####################
processor:
build:
context: infrastructure/docker/processor
mem_limit: 512m
environment:
- CATALINA_OPTS=-XX:+UseContainerSupport -XX:MaxRAMPercentage=75 # heap will use up to 75% of container's RAM
- ENDPOINT="https://sparql.opendatahub.testingmachine.eu/sparql"
- GRAPH_STORE="https://sparql.opendatahub.testingmachine.eu/service" # not used but needs a value
- ONTOLOGY="https://kg.opendatahub.bz.it/ns/templates#"
processor-nginx:
build:
context: infrastructure/docker/processor-nginx
mem_limit: 128m
depends_on:
- processor
ports:
- 8888:80
environment:
- PROXY_PASS=http://processor:8080 # internal Processor URL (hostname equals docker-compose service name)
- PROXY_SET_HOST=${HOST} # the hostname set on the request URI before it's passed to Processor