-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
69 lines (65 loc) · 1.7 KB
/
docker-compose.yml
File metadata and controls
69 lines (65 loc) · 1.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
version: '3.8'
services:
# PostgreSQL Database
db:
image: postgres:16-alpine
container_name: supfile-db
restart: unless-stopped
environment:
POSTGRES_USER: supfile
POSTGRES_PASSWORD: supfile_password
POSTGRES_DB: supfile_db
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U supfile -d supfile_db"]
interval: 10s
timeout: 5s
retries: 5
# Backend API
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: supfile-backend
restart: unless-stopped
environment:
DATABASE_URL: postgresql://supfile:supfile_password@db:5432/supfile_db?schema=public
JWT_SECRET: ${JWT_SECRET:-your-super-secret-jwt-key-change-in-production}
JWT_EXPIRES_IN: 7d
PORT: 3001
NODE_ENV: production
FRONTEND_URL: http://localhost
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET}
GITHUB_CLIENT_ID: ${GITHUB_CLIENT_ID}
GITHUB_CLIENT_SECRET: ${GITHUB_CLIENT_SECRET}
STORAGE_PATH: /app/storage
MAX_STORAGE_BYTES: 32212254720
volumes:
- storage_data:/app/storage
ports:
- "3001:3001"
depends_on:
db:
condition: service_healthy
command: >
sh -c "npx prisma migrate deploy && node src/server.js"
# Frontend
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: supfile-frontend
restart: unless-stopped
ports:
- "80:80"
depends_on:
- backend
volumes:
postgres_data:
name: supfile_postgres_data
storage_data:
name: supfile_storage_data