-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
62 lines (58 loc) · 1.52 KB
/
docker-compose.yml
File metadata and controls
62 lines (58 loc) · 1.52 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
version: "3.8"
services:
# PostgreSQL Database
postgres:
image: postgres:17-alpine
container_name: hushnet-postgres
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-dev}
POSTGRES_DB: ${POSTGRES_DB:-e2ee}
expose:
- "5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./sql_models/seed.sql:/docker-entrypoint-initdb.d/seed.sql
networks:
- hushnet
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
interval: 10s
timeout: 5s
retries: 5
# HushNet Backend
backend:
build:
context: .
dockerfile: Dockerfile
container_name: hushnet-backend
restart: unless-stopped
environment:
DATABASE_URL: postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-dev}@postgres:5432/${POSTGRES_DB:-e2ee}
JWT_SECRET: ${JWT_SECRET:-super_long_random_secret_64bytes}
RUST_LOG: ${RUST_LOG:-info}
SERVER_HOST: ${SERVER_HOST:-0.0.0.0}
SERVER_PORT: ${SERVER_PORT:-8080}
RUST_BACKTRACE: "full"
env_file:
- .env
ports:
- "${BACKEND_PORT:-8080}:8080"
depends_on:
postgres:
condition: service_healthy
networks:
- hushnet
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
interval: 30s
timeout: 3s
retries: 3
start_period: 10s
volumes:
postgres_data:
driver: local
networks:
hushnet:
driver: bridge