-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (45 loc) · 1013 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
50 lines (45 loc) · 1013 Bytes
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.8"
services:
frontend:
build:
context: ./frontend
ports:
- "3000:3000"
container_name: caritutor_frontend
backend:
build: ./backend
container_name: caritutor_backend
ports:
- "9998:80"
environment:
- DB_HOST=db
- DB_NAME=mydb
- DB_USER=myuser
- DB_PASSWORD=mypassword
depends_on:
db:
condition: service_healthy
nginx:
image: nginx:latest
container_name: caritutor_nginx
ports:
- "9999:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- backend
- frontend
db:
image: postgres:14
container_name: caritutor_db
restart: always
environment:
POSTGRES_DB: mydb
POSTGRES_USER: myuser
POSTGRES_PASSWORD: mypassword
volumes:
- postgres_data:/var/lib/postgresql/data/
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
volumes:
postgres_data: