-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (54 loc) · 1.72 KB
/
docker-compose.yml
File metadata and controls
57 lines (54 loc) · 1.72 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
services:
db:
image: postgres:17-alpine
restart: always
environment:
POSTGRES_DB: ${POSTGRES_DB:-octobird}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB:-octobird}"]
interval: 10s
timeout: 5s
retries: 10
backend:
build:
context: ./backend
dockerfile: Dockerfile
restart: always
depends_on:
db:
condition: service_healthy
environment:
DB_URL: jdbc:postgresql://db:5432/${POSTGRES_DB:-octobird}
DB_USERNAME: ${POSTGRES_USER}
DB_PASSWORD: ${POSTGRES_PASSWORD}
DB_DRIVER: org.postgresql.Driver
BOT_APP_ID: ${BOT_APP_ID}
BOT_PRIVATE_KEY: ${BOT_PRIVATE_KEY}
BOT_WEBHOOK_SECRET: ${BOT_WEBHOOK_SECRET}
PORT: 8080
labels:
- traefik.enable=true
- traefik.http.routers.octobird-backend.rule=Host(`${SERVICE_FQDN_BACKEND}`)
- traefik.http.routers.octobird-backend.entrypoints=http,https
- traefik.http.routers.octobird-backend.tls=true
- traefik.http.services.octobird-backend.loadbalancer.server.port=8080
frontend:
build: ./frontend
restart: always
depends_on:
- backend
environment:
- BACKEND_URL=http://backend:8080
- NODE_ENV=production
labels:
- traefik.enable=true
- traefik.http.routers.octobird-frontend.rule=Host(`${SERVICE_FQDN_FRONTEND}`)
- traefik.http.routers.octobird-frontend.entrypoints=http,https
- traefik.http.routers.octobird-frontend.tls=true
- traefik.http.services.octobird-frontend.loadbalancer.server.port=3000
volumes:
pgdata: