Add docker-compose.yml and env.example

This commit is contained in:
taogaetz 2025-09-08 14:39:25 -04:00
parent 32f5d216ba
commit 208c8be6c4
2 changed files with 39 additions and 0 deletions

27
docker-compose.yml Normal file
View File

@ -0,0 +1,27 @@
version: '3.8'
services:
chefbible:
image: git.redbackpack.ca/taogaetz/chefbible:latest
container_name: chefbible
restart: unless-stopped
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- DATABASE_URL=file:/app/data/database.db
- MAGIC_LINK_TOKEN=${MAGIC_LINK_TOKEN}
- CLOUDINARY_URL=${CLOUDINARY_URL}
- ORIGIN=${ORIGIN}
volumes:
- chefbible_data:/app/data
healthcheck:
test: [ "CMD", "node", "-e", "require('http').get('http://localhost:3000/health', (res) => { process.exit(res.statusCode === 200 ? 0 : 1) })" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
chefbible_data:
driver: local

12
env.example Normal file
View File

@ -0,0 +1,12 @@
# ChefBible Environment Variables
# Copy this file to .env and customize the values
# These variables are used by docker-compose.yml
# Application URL (required)
ORIGIN=https://your-domain.com
# Authentication token (required - generate a secure random token)
MAGIC_LINK_TOKEN=your-secure-token-here
# Cloudinary URL for photo uploads (optional)
CLOUDINARY_URL=cloudinary://api_key:api_secret@cloud_name