forked from Language-Research-Technology/oni-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
84 lines (79 loc) · 1.91 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
version: "3.8"
networks:
oni:
name: oni
driver: bridge
volumes:
postgres_data:
opensearch_data:
services:
db:
restart: always
image: postgres:13-alpine
hostname: db
tty: true
environment:
TERM: "xterm-256color"
NODE_ENV: "production"
POSTGRES_DB: "oni"
POSTGRES_USER: "root"
POSTGRES_PASSWORD: ""
POSTGRES_HOST_AUTH_METHOD: "trust"
PGDATA: /postgresql/data
volumes:
- postgres_data:/postgresql
ports:
- "5432:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d oni" ]
interval: 30s
timeout: 10s
retries: 5
api:
restart: always
image: rrkive/oni:2.0.1
depends_on:
db:
condition: service_healthy
opensearch:
condition: service_healthy
hostname: api
tty: true
environment:
TERM: "xterm-256color"
NODE_ENV: "production"
LOG_LEVEL: "debug"
DB_HOST: "db"
DB_PORT: "5432"
DB_USER: "root"
DB_PASSWORD: ""
DB_DATABASE: "oni"
SEARCH_HOST: "opensearch"
volumes:
- ./configuration.json:/srv/configuration.json
- /opt/storage/oni:/opt/storage/oni
ports:
- "8080:8080"
command: [ "npm", "run", "prod" ]
opensearch:
restart: always
image: opensearchproject/opensearch:2.13.0
hostname: opensearch
tty: true
environment:
- TERM="xterm-256color"
- discovery.type=single-node
- ES_JAVA_OPTS=-Xms2g -Xmx2g
#- xpack.security.enabled=false # for elasticsearch
- plugins.security.disabled=true # for opensearch
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=ASd8asfhqu2i3r@#$1546
volumes:
- opensearch_data:/usr/share/elasticsearch/data
ports:
- "9200:9200"
- "9300:9300"
healthcheck:
test: [ "CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1" ]
interval: 30s
timeout: 10s
retries: 5