-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
73 lines (69 loc) · 1.87 KB
/
docker-compose.yaml
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
66
67
68
69
70
71
72
73
version: "3.8"
services:
nginx:
image: nginx:1.25.3
container_name: nginx
ports:
- 80:80
- 443:443
restart: always
volumes:
- /opt/swimlogs/dist:/usr/share/nginx/html:ro
- /opt/swimlogs/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- /opt/swimlogs/certbot/conf:/etc/letsencrypt:ro
- /opt/swimlogs/certbot/www:/var/www/certbot:ro
environment:
- TZ=Europe/Bratislava
depends_on:
backend:
condition: service_healthy
certbot:
image: certbot/certbot
container_name: certbot
volumes:
- /opt/swimlogs/certbot/conf:/etc/letsencrypt
- /opt/swimlogs/certbot/www:/var/www/certbot
command: certonly --non-interactive --keep-until-expiring --webroot -w /var/www/certbot --email [email protected] -d www.swimlogs.com --agree-tos
backend:
image: nesquiko/swimlogs-backend:latest
container_name: backend
ports:
- 42069:42069
environment:
- APP_HOST=0.0.0.0
- APP_PORT=42069
- DATABASE_HOST=db
- DATABASE_PORT=5432
- DATABASE_USER=swimlogs
- DATABASE_PASSWORD=swimlogs
- DATABASE_NAME=swimlogs
- FE_ORIGIN=https://www.swimlogs.com
- TZ=Europe/Bratislava
restart: always
healthcheck:
test: "wget --tries=1 --spider http://localhost:42069/monitoring/heartbeat || exit 1"
interval: 5s
timeout: 3s
retries: 3
depends_on:
db:
condition: service_healthy
db:
image: postgres:16.1
container_name: db
restart: always
environment:
- POSTGRES_USER=swimlogs
- POSTGRES_PASSWORD=swimlogs
- POSTGRES_DB=swimlogs
- TZ=Europe/Bratislava
- PGTZ=Europe/Bratislava
volumes:
- db:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "swimlogs"]
interval: 5s
timeout: 5s
retries: 5
volumes:
db: