Repository navigation
Expand file tree
/
Copy pathcompose.yaml
More file actions
65 lines (59 loc) · 1.31 KB
/
Copy pathcompose.yaml
File metadata and controls
65 lines (59 loc) · 1.31 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
57
58
59
60
61
62
63
64
65
name: bidcheck
services:
proxy:
build:
context: ./proxy
ports:
- "${HTTP_PORT:-8082}:80"
depends_on:
frontend:
condition: service_started
backend:
condition: service_healthy
restart: unless-stopped
frontend:
build:
context: ./frontend
expose:
- "80"
restart: unless-stopped
backend:
build:
context: ./backend
env_file:
- .env
networks:
- default
- teoria
expose:
- "8000"
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
interval: 10s
timeout: 3s
retries: 10
start_period: 10s
restart: unless-stopped
postgres:
image: postgres:17-alpine
environment:
POSTGRES_DB: ${POSTGRES_DB:-bidcheck}
POSTGRES_USER: ${POSTGRES_USER:-bidcheck}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 10
restart: unless-stopped
volumes:
postgres_data:
networks:
teoria:
external: true
name: teoria_default