-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
122 lines (116 loc) · 2.72 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
version: "3.8"
networks:
oni:
name: oni
driver: bridge
volumes:
postgres_data:
opensearch_data:
services:
web:
restart: always
image: rrkive/nginx-oni:1.26.1
platform: linux/amd64
depends_on:
api:
condition: service_healthy
hostname: web
container_name: web
tty: true
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./portal/dist:/var/www/oni-ui
- /opt/storage/oni:/opt/storage/oni
#- /etc/letsencrypt:/etc/letsencrypt
#- /var/log/nginx:/var/log/nginx
ports:
- "8000:80"
- "44300:443"
#network_mode: host
networks:
- oni
db:
restart: always
image: postgres:13-alpine
hostname: db
container_name: 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
networks:
- oni
api:
restart: always
image: rrkive/oni:2.1.0
platform: linux/amd64
depends_on:
db:
condition: service_healthy
opensearch:
condition: service_healthy
user: "1000:1000"
hostname: api
container_name: 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"
volumes:
- ./configuration.json:/srv/configuration.json
- /opt/storage/oni:/opt/storage/oni
ports:
- "0.0.0.0:8080:8080"
healthcheck:
test: [ "CMD-SHELL", "node -v || exit 1" ]
interval: 30s
timeout: 10s
retries: 5
command: [ "npm", "run", "prod" ]
networks:
- oni
opensearch:
restart: always
image: opensearchproject/opensearch:2.13.0
hostname: opensearch
container_name: 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/opensearch/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
networks:
- oni