-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
113 lines (103 loc) · 2.7 KB
/
docker-compose.yaml
File metadata and controls
113 lines (103 loc) · 2.7 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
services:
# Database service
postgres:
image: postgres:15
container_name: safevault_postgres
environment:
POSTGRES_USER: safevault
POSTGRES_PASSWORD: safevaultpass
POSTGRES_DB: safevault_db
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- safevault_network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U safevault -d safevault_db"]
interval: 30s
timeout: 10s
retries: 3
# MinIO service for file storage
minio:
image: minio/minio:latest
container_name: safevault_minio
command: server /data --console-address ":9001"
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio_data:/data
networks:
- safevault_network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 10s
retries: 3
# Backend service
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: safevault_backend
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
minio:
condition: service_healthy
environment:
# Database configuration
- DATABASE_URL_PROD=postgres://safevault:safevaultpass@postgres:5432/safevault_db?sslmode=disable
- DB_HOST=postgres
- DB_PORT=5432
- DB_USER=safevault
- DB_PASSWORD=safevaultpass
- DB_NAME=safevault_db
- DB_SSLMODE=disable
# JWT Authentication
- JWT_SECRET=your-super-secret-jwt-key-for-development-only-change-in-production
# MinIO configuration
- MINIO_ENDPOINT=minio:9000
- MINIO_ACCESS_KEY=minioadmin
- MINIO_SECRET_KEY=minioadmin
- MINIO_USE_SSL=false
- MINIO_BUCKET=filehive
- MINIO_PUBLIC_ENDPOINT=http://localhost:9000
# Google OAuth (optional)
- GOOGLE_CLIENT_ID=your-google-client-id
# Admin configuration
- ADMIN_EMAIL=admin@example.com
# Application configuration
- PORT=8080
- GIN_MODE=release
networks:
- safevault_network
restart: unless-stopped
# Frontend service
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: safevault_frontend
ports:
- "3000:3000"
depends_on:
- backend
environment:
- NODE_ENV=production
- NEXT_PUBLIC_API_URL=http://localhost:8080
networks:
- safevault_network
restart: unless-stopped
volumes:
postgres_data:
minio_data:
networks:
safevault_network:
driver: bridge