-
Notifications
You must be signed in to change notification settings - Fork 1
/
compose.yml
103 lines (97 loc) · 2.31 KB
/
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
services:
web:
build:
context: ./Tekst-Web
target: prod
args:
WEB_PATH: ${TEKST_WEB_PATH:?TEKST_WEB_PATH not set in .env}
SERVER_URL: ${TEKST_SERVER_URL:?TEKST_SERVER_URL not set in .env}
API_PATH: ${TEKST_API_PATH:?TEKST_API_PATH not set in .env}
image: "tekst-web:custom"
environment:
TEKST_SERVER_URL: ${TEKST_SERVER_URL:?TEKST_SERVER_URL not set in .env}
TEKST_API_PATH: ${TEKST_API_PATH:?TEKST_API_PATH not set in .env}
volumes:
- ${TEKST_WEB_STATIC_DIR:?TEKST_WEB_STATIC_DIR not set in .env}:/var/www/tekst/static/:ro
restart: always
ports:
- "127.0.0.1:8087:80"
networks:
- api
api:
build:
context: ./Tekst-API
target: prod
image: "tekst-api:custom"
restart: always
init: true
depends_on:
mongo:
condition: service_healthy
restart: true
es:
condition: service_healthy
restart: true
env_file: .env
networks:
- api
- mongo
- es
mongo:
image: mongo:8
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: ${TEKST_DB__USER}
MONGO_INITDB_ROOT_PASSWORD: ${TEKST_DB__PASSWORD}
volumes:
- mongo_configdb:/data/configdb
- mongo_db:/data/db
networks:
- mongo
command: ["mongod", "--quiet", "--setParameter", "diagnosticDataCollectionEnabled=false"]
healthcheck:
test: echo "db.getMongo()" | mongosh --norc --quiet --host=localhost:27017
interval: 1m30s
timeout: 10s
retries: 3
start_period: 1m
start_interval: 5s
es:
build:
context: ./Tekst-API/deployment/elasticsearch
image: "elasticsearch:tekst"
environment:
discovery.type: single-node
xpack.security.enabled: false
logger.level: WARN
deploy:
resources:
limits:
memory: 2G
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
restart: always
volumes:
- es_data:/usr/share/elasticsearch/data
networks:
- es
healthcheck:
test: curl -f http://localhost:9200
interval: 1m30s
timeout: 10s
retries: 3
start_period: 3m
start_interval: 5s
volumes:
mongo_configdb:
mongo_db:
es_data:
networks:
api:
mongo:
es: