feat: prisma schema, groups API, deploy workflow
This commit is contained in:
@@ -9,10 +9,10 @@ services:
|
||||
# ==========================================
|
||||
gitea:
|
||||
image: gitea/gitea:latest-rootless
|
||||
container_name: nanaxe-gitea
|
||||
container_name: xflow-gitea
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- nanaxe-network
|
||||
- xflow-network
|
||||
volumes:
|
||||
- gitea-data:/data
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
@@ -56,10 +56,10 @@ services:
|
||||
# ==========================================
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
container_name: nanaxe-postgres
|
||||
container_name: xflow-postgres
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- nanaxe-network
|
||||
- xflow-network
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
- ./backups:/backups
|
||||
@@ -82,65 +82,15 @@ services:
|
||||
cpus: '0.1'
|
||||
memory: 64M
|
||||
|
||||
# ==========================================
|
||||
# Nanaxe API - Production
|
||||
# ==========================================
|
||||
nanaxe-api:
|
||||
image: ghcr.io/${GITHUB_REPOSITORY:-nanaxe}/nanaxe-api:latest
|
||||
container_name: nanaxe-api
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- nanaxe-network
|
||||
volumes:
|
||||
- mindmap-data:/app/mindmaps
|
||||
- api-logs:/app/logs
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- PORT=8080
|
||||
- GITEA_URL=http://gitea:3000
|
||||
- GITEA_TOKEN=${GITEA_TOKEN}
|
||||
- JWT_SECRET=${JWT_SECRET}
|
||||
- MINDMAP_STORAGE_PATH=/app/mindmaps
|
||||
- LOG_LEVEL=info
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8080/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 64M
|
||||
replicas: 1
|
||||
update_config:
|
||||
parallelism: 1
|
||||
delay: 10s
|
||||
failure_action: rollback
|
||||
order: start-first
|
||||
rollback_config:
|
||||
parallelism: 1
|
||||
delay: 10s
|
||||
failure_action: pause
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
gitea:
|
||||
condition: service_healthy
|
||||
|
||||
# ==========================================
|
||||
# Nginx - Production with SSL
|
||||
# ==========================================
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
container_name: nanaxe-nginx
|
||||
container_name: xflow-nginx
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- nanaxe-network
|
||||
- xflow-network
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
@@ -162,17 +112,16 @@ services:
|
||||
memory: 128M
|
||||
depends_on:
|
||||
- gitea
|
||||
- nanaxe-api
|
||||
|
||||
# ==========================================
|
||||
# Certbot - SSL Certificates
|
||||
# ==========================================
|
||||
certbot:
|
||||
image: certbot/certbot
|
||||
container_name: nanaxe-certbot
|
||||
container_name: xflow-certbot
|
||||
restart: "no"
|
||||
networks:
|
||||
- nanaxe-network
|
||||
- xflow-network
|
||||
volumes:
|
||||
- certbot-data:/etc/letsencrypt
|
||||
- certbot-www:/var/www/certbot
|
||||
@@ -185,10 +134,10 @@ services:
|
||||
# ==========================================
|
||||
watchtower:
|
||||
image: containrrr/watchtower
|
||||
container_name: nanaxe-watchtower
|
||||
container_name: xflow-watchtower
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- nanaxe-network
|
||||
- xflow-network
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
@@ -207,10 +156,10 @@ services:
|
||||
# ==========================================
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: nanaxe-redis
|
||||
container_name: xflow-redis
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- nanaxe-network
|
||||
- xflow-network
|
||||
volumes:
|
||||
- redis-data:/data
|
||||
command: redis-server --appendonly yes --maxmemory 64mb --maxmemory-policy allkeys-lru
|
||||
@@ -228,7 +177,7 @@ services:
|
||||
- cache
|
||||
|
||||
networks:
|
||||
nanaxe-network:
|
||||
xflow-network:
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
@@ -239,8 +188,6 @@ volumes:
|
||||
driver: local
|
||||
postgres-data:
|
||||
driver: local
|
||||
mindmap-data:
|
||||
driver: local
|
||||
api-logs:
|
||||
driver: local
|
||||
certbot-data:
|
||||
|
||||
Reference in New Issue
Block a user