-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (47 loc) · 1.28 KB
/
docker-compose.yml
File metadata and controls
50 lines (47 loc) · 1.28 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
version: '3.8'
services:
db:
image: postgres:15-alpine
restart: always
environment:
POSTGRES_USER: ${DB_USER:-postgres}
POSTGRES_PASSWORD: ${DB_PASSWORD:-postgres}
POSTGRES_DB: ${DB_NAME:-qvote}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${DB_USER:-postgres}" ]
interval: 5s
timeout: 5s
retries: 5
app:
build: .
restart: always
depends_on:
db:
condition: service_healthy
ports:
- "${PORT:-8443}:8443"
- "5555:5555"
environment:
- SLACK_CLIENT_ID=${SLACK_CLIENT_ID}
- SLACK_CLIENT_SECRET=${SLACK_CLIENT_SECRET}
- SLACK_REDIRECT_URI=${SLACK_REDIRECT_URI}
- PORT=${PORT:-8443}
- USE_HTTPS=${USE_HTTPS:-true}
- CERT_FILE=${CERT_FILE:-/app/certs/cert.pem}
- KEY_FILE=${KEY_FILE:-/app/certs/key.pem}
- DB_HOST=db
- DB_PORT=5432
- DB_USER=${DB_USER:-postgres}
- DB_PASSWORD=${DB_PASSWORD:-postgres}
- DB_NAME=${DB_NAME:-qvote}
command: >
sh -c "deno task setup-db && deno run --allow-net --allow-env --allow-read --allow-ffi main.ts"
volumes:
- .env:/app/.env
- ./certs:/app/certs
volumes:
postgres_data: