-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (66 loc) · 1.89 KB
/
docker-compose.yml
File metadata and controls
70 lines (66 loc) · 1.89 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
63
64
65
66
67
68
69
70
version: "3.8"
services:
# PostgreSQL Database
postgres:
image: postgres:17-alpine
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
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"
NODE_NAME: ${NODE_NAME:-node-eu1}
NODE_HOST: ${NODE_HOST:-host.docker.internal}
NODE_API_URL: ${NODE_API_URL:-http://host.docker.internal:8080}
REGISTRY_URL: ${REGISTRY_URL:-https://registry.hushnet.net/}
CONTACT_EMAIL: ${CONTACT_EMAIL:-ops@hushnet.net}
REGISTER_TO_REGISTRY: ${REGISTER_TO_REGISTRY:-true}
env_file:
- .env
volumes:
- node_keys:/app/.hushnet
ports:
- "${SERVER_PORT:-8080}:${SERVER_PORT:-8080}"
depends_on:
postgres:
condition: service_healthy
networks:
- hushnet
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${SERVER_PORT:-8080}/"]
interval: 30s
timeout: 3s
retries: 3
start_period: 10s
volumes:
postgres_data:
driver: local
node_keys:
driver: local
networks:
hushnet:
driver: bridge