-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (61 loc) · 1.87 KB
/
Copy pathdocker-compose.yml
File metadata and controls
64 lines (61 loc) · 1.87 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
version: '3.8'
services:
backend:
build:
context: .
dockerfile: apps/backend/Dockerfile
target: production
container_name: workstack-backend
# restart: unless-stopped
environment:
DATABASE_URL: ${DATABASE_URL}
DIRECT_URL: ${DIRECT_URL:-${DATABASE_URL}}
NODE_ENV: ${NODE_ENV:-production}
PORT: ${PORT:-${BACKEND_PORT:-3000}}
HOST: 0.0.0.0
LOG_LEVEL: ${LOG_LEVEL:-info}
CORS_ORIGIN: ${CORS_ORIGIN:-http://localhost:8080}
JWT_SECRET: ${JWT_SECRET:-change-me-in-production}
APP_KEYS: ${APP_KEYS:-}
RATE_LIMIT_MAX: ${RATE_LIMIT_MAX:-100}
RATE_LIMIT_TIME_WINDOW: ${RATE_LIMIT_TIME_WINDOW:-60000}
APP_ENV: ${APP_ENV:-production}
APP_NAME: ${APP_NAME:-WorkStack}
APP_URL: ${APP_URL:-http://localhost:3000}
REDIS_URL: ${REDIS_URL:-127.0.0.1}
REDIS_PORT: ${REDIS_PORT:-6379}
REDIS_USERNAME: ${REDIS_USERNAME:-redis-user}
REDIS_PASSWORD: ${REDIS_PASSWORD:-password}
ports:
- "${PORT:-${BACKEND_PORT:-3000}}:3000"
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- workstack-network
frontend:
build:
context: .
dockerfile: apps/frontend/Dockerfile
args:
VITE_API_URL: ${VITE_API_URL:-http://localhost:3000}
container_name: workstack-frontend
# restart: unless-stopped
depends_on:
- backend
ports:
- "${FRONTEND_PORT:-8080}:80"
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost/"]
interval: 30s
timeout: 3s
start_period: 10s
retries: 3
networks:
- workstack-network
networks:
workstack-network:
driver: bridge