-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose_server.yml
More file actions
53 lines (49 loc) · 1.02 KB
/
docker-compose_server.yml
File metadata and controls
53 lines (49 loc) · 1.02 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
51
52
53
services:
postgres:
image: postgres:16
restart: always
environment:
POSTGRES_DB: websec
POSTGRES_USER: websec
POSTGRES_PASSWORD: secret
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U websec -d websec"]
interval: 5s
timeout: 5s
retries: 5
backend:
build: ./backend
restart: always
environment:
DATABASE_URL: postgresql://websec:secret@postgres:5432/websec
expose:
- "8000"
depends_on:
postgres:
condition: service_healthy
frontend:
build: ./frontend
restart: always
expose:
- "3000"
volumes:
- ./frontend:/app
- /app/node_modules
nginx:
image: nginx:stable
restart: always
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- /etc/letsencrypt:/etc/letsencrypt:ro
ports:
# - "8080:80"
- "443:443"
depends_on:
- backend
- frontend
volumes:
pgdata: