-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
39 lines (37 loc) · 910 Bytes
/
docker-compose.yml
File metadata and controls
39 lines (37 loc) · 910 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
services:
postgres:
image: postgres:trixie
environment:
POSTGRES_DB: gitarena
POSTGRES_USER: gitarena
POSTGRES_PASSWORD: gitarena
expose:
- "5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U gitarena"]
interval: 5s
timeout: 3s
retries: 5
gitarena:
build: Dockerfile
depends_on:
postgres:
condition: service_healthy
ports:
- "8080:8080"
volumes:
- repos:repositories
environment:
# TODO: Remove this once nginx is also added to this compose
SERVE_STATIC_FILES: true
DATABASE_URL: "postgresql://gitarena@gitarena:5432/gitarena?sslmode=disable"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/healthz || exit 1"]
interval: 10s
timeout: 5s
retries: 5
volumes:
pgdata:
repos: