chore: add deployment configuration
- docker-compose.yml for VPS deployment - deploy.sh for auto-updates - Fixed package.json name Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
16
deploy.sh
Normal file
16
deploy.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
PROJECT_DIR="/opt/lab-leopost"
|
||||
cd "$PROJECT_DIR"
|
||||
|
||||
echo "[$(date)] Auto-deploy triggered" >> deploy.log
|
||||
|
||||
# Pull latest
|
||||
git pull origin main
|
||||
|
||||
# Rebuild e restart
|
||||
docker compose build --no-cache
|
||||
docker compose up -d
|
||||
|
||||
echo "[$(date)] Auto-deploy completed" >> deploy.log
|
||||
28
docker-compose.yml
Normal file
28
docker-compose.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
networks:
|
||||
proxy_net:
|
||||
external: true
|
||||
|
||||
services:
|
||||
app:
|
||||
image: node:20-alpine
|
||||
container_name: lab-leopost-app
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ./:/app
|
||||
- /app/node_modules
|
||||
- /app/.next
|
||||
networks:
|
||||
- proxy_net
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- NEXT_PUBLIC_SUPABASE_URL=${SUPABASE_URL}
|
||||
- NEXT_PUBLIC_SUPABASE_ANON_KEY=${SUPABASE_ANON_KEY}
|
||||
- SUPABASE_SERVICE_ROLE_KEY=${SUPABASE_SERVICE_ROLE_KEY}
|
||||
- NEXT_PUBLIC_APP_URL=${APP_URL}
|
||||
command: sh -c "npm install && npm run build && npm start"
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 512M
|
||||
cpus: '0.5'
|
||||
restart: unless-stopped
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "nextjs-temp",
|
||||
"name": "leopost",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user