-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (52 loc) · 1.08 KB
/
docker-compose.yml
File metadata and controls
56 lines (52 loc) · 1.08 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
54
55
56
version: '3.11'
services:
proxy:
image: caddy:2-alpine
restart: always
cap_add: [ NET_ADMIN ]
ports: [ 80:80, 443:443 ]
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data
- caddy_config:/config
env_file: [ .env ]
postgres:
container_name: postgres_hack
image: postgres:latest
restart: unless-stopped
env_file:
- backend/src/db.env
healthcheck:
test:
[
"CMD-SHELL",
"sh -c 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}'"
]
interval: 10s
timeout: 3s
retries: 2
volumes:
- ./db-data:/var/lib/postgresql/data
ports:
- 5432:5432
frontend:
build: ./frontend
expose: [ 3000 ]
restart: unless-stopped
init: true
backend:
restart: unless-stopped
env_file:
- backend/src/app.env
volumes:
- ./backend/src/logs:/backend/src/logs
depends_on:
- postgres
ports:
- 8080:8000
build:
context: backend/src
dockerfile: Dockerfile
volumes:
caddy_data:
caddy_config: