Chore: Improve Docker deployment configuration
- Use environment variables in docker-compose for secrets/paths - Add .env.example template for required variables - Add .env to .gitignore to prevent secret exposure - Add docker-build-and-push.cmd helper script 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
13
.env.example
Normal file
13
.env.example
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# Docker image
|
||||||
|
DOCKER_IMAGE=yourusername/moneymap:latest
|
||||||
|
|
||||||
|
# Database connection
|
||||||
|
DB_SERVER=your-server
|
||||||
|
DB_USER=your-username
|
||||||
|
DB_PASSWORD=your-password
|
||||||
|
|
||||||
|
# OpenAI API key for receipt parsing
|
||||||
|
OPENAI_API_KEY=your-openai-key
|
||||||
|
|
||||||
|
# Host path for receipt storage
|
||||||
|
RECEIPTS_HOST_PATH=/mnt/docker-data/moneymap/receipts
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -34,3 +34,6 @@ packages/
|
|||||||
/MoneyMap/wwwroot/lib/
|
/MoneyMap/wwwroot/lib/
|
||||||
/MoneyMap/wwwroot/receipts/
|
/MoneyMap/wwwroot/receipts/
|
||||||
**/publish/
|
**/publish/
|
||||||
|
|
||||||
|
# Environment files with secrets
|
||||||
|
.env
|
||||||
|
|||||||
2
docker-build-and-push.cmd
Normal file
2
docker-build-and-push.cmd
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
docker build -t ajisaacs/moneymap:latest ./MoneyMap
|
||||||
|
docker push ajisaacs/moneymap:latest
|
||||||
@@ -1,15 +1,13 @@
|
|||||||
services:
|
services:
|
||||||
moneymap:
|
moneymap:
|
||||||
build:
|
image: ${DOCKER_IMAGE:-yourusername/moneymap:latest}
|
||||||
context: ./MoneyMap
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
container_name: moneymap
|
container_name: moneymap
|
||||||
ports:
|
ports:
|
||||||
- "5010:5010"
|
- "5010:5010"
|
||||||
environment:
|
environment:
|
||||||
- ConnectionStrings__MoneyMapDb=Server=barge.lan;Database=MoneyMap;User Id=moneymap;Password=YOUR_PASSWORD;TrustServerCertificate=True;
|
- ConnectionStrings__MoneyMapDb=Server=${DB_SERVER};Database=MoneyMap;User Id=${DB_USER};Password=${DB_PASSWORD};TrustServerCertificate=True;
|
||||||
- Receipts__StoragePath=/app/receipts
|
- Receipts__StoragePath=receipts
|
||||||
- OPENAI_API_KEY=${OPENAI_API_KEY}
|
- OPENAI_API_KEY=${OPENAI_API_KEY}
|
||||||
volumes:
|
volumes:
|
||||||
- /mnt/docker-data/moneymap/receipts:/app/receipts
|
- ${RECEIPTS_HOST_PATH}:/app/wwwroot/receipts
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|||||||
Reference in New Issue
Block a user