-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsentinel.yaml
More file actions
112 lines (106 loc) · 2.23 KB
/
sentinel.yaml
File metadata and controls
112 lines (106 loc) · 2.23 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
# Sentinel Configuration - Python FastAPI
# FastAPI + React + PostgreSQL
#
# Built by Glincker (A GLINR Product)
# https://glincker.com/sentinel
# Global environment variables
global_env:
PYTHONUNBUFFERED: "1"
LOG_LEVEL: debug
processes:
# PostgreSQL Database
- name: postgres
command: docker
args:
- run
- --rm
- --name
- sentinel-postgres
- -p
- "5432:5432"
- -e
- POSTGRES_USER=postgres
- -e
- POSTGRES_PASSWORD=postgres
- -e
- POSTGRES_DB=myapp
- postgres:16-alpine
auto_restart: true
max_restarts: 5
restart_delay_ms: 3000
# FastAPI Backend
- name: backend
command: uvicorn
args:
- main:app
- --reload
- --host
- "0.0.0.0"
- --port
- "8101"
cwd: ./server
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/myapp
SECRET_KEY: your-secret-key-change-in-production
CORS_ORIGINS: http://localhost:8100
ENVIRONMENT: development
depends_on:
- postgres
auto_restart: true
max_restarts: 3
restart_delay_ms: 1000
health_check:
command: curl
args:
- -f
- http://localhost:8101/api/health
interval_ms: 10000
timeout_ms: 5000
retries: 3
# React Frontend (Vite)
- name: frontend
command: npm
args:
- run
- dev
cwd: ./client
env:
PORT: "8100"
VITE_API_URL: http://localhost:8101/api
depends_on:
- backend
auto_restart: true
max_restarts: 3
restart_delay_ms: 1000
# Optional: Redis for caching
- name: redis
command: docker
args:
- run
- --rm
- --name
- sentinel-redis
- -p
- "6379:6379"
- redis:7-alpine
auto_restart: true
max_restarts: 5
restart_delay_ms: 2000
# Optional: Celery Worker (async tasks)
- name: celery-worker
command: celery
args:
- -A
- main.celery
- worker
- --loglevel=info
cwd: ./server
env:
REDIS_URL: redis://localhost:6379/0
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/myapp
depends_on:
- redis
- postgres
auto_restart: true
max_restarts: 3
restart_delay_ms: 2000