-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathdocker-compose.yml
executable file
·89 lines (82 loc) · 1.75 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"
services:
back-end:
build:
context: backend
container_name: back-end
working_dir: /usr/src/app/backend
networks:
- node-network
tty: true
ports:
- "8001:8001"
command: npm start
front-end:
build:
context: frontend
container_name: front-end
working_dir: /usr/src/app/frontend
networks:
- node-network
tty: true
ports:
- "3000:3000"
command: npm run preview
eliza:
build:
context: eliza
container_name: eliza
working_dir: /usr/src/app/eliza
networks:
- node-network
tty: true
ports:
- "3030:3030"
environment:
- POSTGRES_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
depends_on:
postgres:
condition: service_healthy
postgres:
build:
context: ./postgres
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- node-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 5
command: >
bash -c "
docker-entrypoint.sh postgres &
sleep 10 &&
psql -U $$POSTGRES_USER -d $$POSTGRES_DB -c 'CREATE EXTENSION IF NOT EXISTS vector;' &
wait
"
nginx:
build:
context: nginx
container_name: nginx
restart: always
tty: true
ports:
- "80:80"
networks:
- node-network
depends_on:
- back-end
- front-end
networks:
node-network:
driver: bridge
volumes:
postgres_data: