From 208c8be6c421f4f9d61f3a28847962f08e6335b5 Mon Sep 17 00:00:00 2001 From: taogaetz <59668529+taogaetz@users.noreply.github.com> Date: Mon, 8 Sep 2025 14:39:25 -0400 Subject: [PATCH] Add docker-compose.yml and env.example --- docker-compose.yml | 27 +++++++++++++++++++++++++++ env.example | 12 ++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 docker-compose.yml create mode 100644 env.example diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..4bfe5a7 --- /dev/null +++ b/docker-compose.yml @@ -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 diff --git a/env.example b/env.example new file mode 100644 index 0000000..9e0ce9f --- /dev/null +++ b/env.example @@ -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