-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (46 loc) 路 1.13 KB
/
Copy pathdocker-compose.yml
File metadata and controls
50 lines (46 loc) 路 1.13 KB
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
version: "3.9"
services:
api:
container_name: nodex_api
build: .
ports:
- "3000:3000"
env_file: .env
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
depends_on:
postgres:
condition: service_healthy
elasticsearch:
condition: service_started
postgres:
image: postgres:15
container_name: nodex_postgres
environment:
POSTGRES_USER: nodex
POSTGRES_PASSWORD: nodexpass
POSTGRES_DB: nodexdb
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./docker/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U nodex -d nodexdb" ]
interval: 5s
timeout: 3s
retries: 20
elasticsearch:
image: elasticsearch:8.12.0
container_name: nodex_elasticsearch
environment:
- discovery.type=single-node
- xpack.security.enabled=false
ports:
- "9200:9200"
volumes:
- es_data:/usr/share/elasticsearch/data
volumes:
postgres_data:
es_data: