fix(docker): correct port mapping and improve container startup
Some checks failed
Build and Push Docker Image (Gitea) / build-and-push (push) Has been cancelled
Some checks failed
Build and Push Docker Image (Gitea) / build-and-push (push) Has been cancelled
- Fix port mapping from 5001:5001 to 5001:5000 to match internal application port - Add entrypoint script for proper database initialization and seeding - Set PORT environment variable to 5000 for consistency - Update Dockerfile to use entrypoint script with proper line ending handling
This commit is contained in:
@@ -2,17 +2,19 @@ version: '3.8'
|
||||
|
||||
services:
|
||||
calorie-tracker:
|
||||
build: ./calorie_tracker_app
|
||||
image: git.jpaleviado.site/kingjaypee12/calorie-tracker:latest
|
||||
container_name: calorie-tracker
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "5001:5001"
|
||||
- "5001:5000"
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
environment:
|
||||
- DATABASE_URL=sqlite:////app/data/calorie_tracker.db
|
||||
- SECRET_KEY=change-this-secret-key-in-production
|
||||
- API_NINJAS_KEY=${API_NINJAS_KEY}
|
||||
- PORT=5000
|
||||
networks:
|
||||
- casaos-net
|
||||
|
||||
|
||||
Reference in New Issue
Block a user