forked from Language-Research-Technology/oni
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
89 lines (84 loc) · 2.42 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
version: "3.8"
networks:
oni:
name: oni
driver: bridge
volumes:
postgres_data:
opensearch_data:
services:
db:
image: postgres:16-alpine
hostname: db
tty: true
environment:
TERM: "xterm-256color"
NODE_ENV: "development"
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:
#image: node:22-alpine
image: oni
build:
context: .
dockerfile: Dev.Dockerfile
depends_on:
db:
condition: service_healthy
opensearch:
condition: service_healthy
user: "1000:1000"
hostname: api
tty: true
environment:
TERM: "xterm-256color"
NODE_ENV: "development"
LOG_LEVEL: "debug"
DB_HOST: "db"
DB_PORT: "5432"
DB_USER: "root"
DB_PASSWORD: ""
DB_DATABASE: "oni"
SEARCH_HOST: "opensearch"
volumes:
- .:/srv:delegated
# - ./{NODE_ENV}-configuration:/srv/configuration
- /opt/storage/oni:/opt/storage/oni
working_dir: /srv
command: ["npm", "run", "dev:docker"]
ports:
- "8080:8080"
- "9229:9229"
opensearch:
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/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