Refactor Docker setup for environment flexibility and dev support
Moved environment variables to .env.template for better management and updated docker-compose files to use them. Added separate docker-compose.dev.yml for development, a Makefile for streamlined commands, and split backend Dockerfile into development and production stages. Updated .gitignore to include new changes.
This commit is contained in:
25
.env.template
Normal file
25
.env.template
Normal file
@@ -0,0 +1,25 @@
|
||||
# Common settings
|
||||
PROJECT_NAME=EventSpace
|
||||
VERSION=1.0.0
|
||||
|
||||
# Database settings
|
||||
POSTGRES_USER=postgres
|
||||
POSTGRES_PASSWORD=postgres
|
||||
POSTGRES_DB=eventspace
|
||||
POSTGRES_HOST=db
|
||||
POSTGRES_PORT=5432
|
||||
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
|
||||
|
||||
# Backend settings
|
||||
BACKEND_PORT=8000
|
||||
SECRET_KEY=your_secret_key_here
|
||||
ENVIRONMENT=development
|
||||
DEBUG=true
|
||||
BACKEND_CORS_ORIGINS=["http://localhost:3000"]
|
||||
FIRST_SUPERUSER_EMAIL=admin@example.com
|
||||
FIRST_SUPERUSER_PASSWORD=admin123
|
||||
|
||||
# Frontend settings
|
||||
FRONTEND_PORT=3000
|
||||
NEXT_PUBLIC_API_URL=http://localhost:8000
|
||||
NODE_ENV=development
|
||||
Reference in New Issue
Block a user