Add deployment workflow to push code to Gitea and redeploy on Mac Mini
Configure Replit project for deployment to a self-hosted Gitea repository, including a `deploy.sh` script on a Mac Mini to pull changes, stop, rebuild, and restart Docker containers. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 1fa9329f-0cec-4a2f-80e8-e26dbae3142e Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 29017a07-e519-4b14-bdf7-b913b959d38f Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/4d696b13-86f2-4c9d-be0d-95b293430047/1fa9329f-0cec-4a2f-80e8-e26dbae3142e/ODGOKcj Replit-Helium-Checkpoint-Created: true
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
# Docker Compose for the EHSAN app on the Mac Mini.
|
||||
#
|
||||
# Two services:
|
||||
# - api : Express API server (internal only, reached via the web proxy)
|
||||
# - web : nginx serving the built SPA + reverse-proxying /api -> api
|
||||
#
|
||||
# Platform is pinned to linux/amd64 because the workspace strips all native
|
||||
# binaries that are not linux-x64-gnu. On Apple Silicon this runs under
|
||||
# emulation/Rosetta automatically.
|
||||
|
||||
services:
|
||||
api:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.api
|
||||
platform: linux/amd64
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
PORT: "8080"
|
||||
expose:
|
||||
- "8080"
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD
|
||||
- node
|
||||
- -e
|
||||
- "fetch('http://localhost:8080/api/healthz').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 20s
|
||||
|
||||
web:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.web
|
||||
platform: linux/amd64
|
||||
ports:
|
||||
# Host port is configurable: WEB_PORT (default 8080) -> container :80
|
||||
- "${WEB_PORT:-8080}:80"
|
||||
depends_on:
|
||||
api:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
Reference in New Issue
Block a user