Skip to content

Commit

Permalink
feat: add local .env
Browse files Browse the repository at this point in the history
  • Loading branch information
omargawdat committed Feb 21, 2025
1 parent dd20602 commit a3e772d
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 8 deletions.
28 changes: 28 additions & 0 deletions .env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
DJANGO_SECRET_KEY='your-key-here' #pragma: allowlist secret
DJANGO_SUPERUSER_USERNAME='admin'
DJANGO_SUPERUSER_PASSWORD='strong_admin_password' # pragma: allowlist secret
DJANGO_ADMIN_NAME=Admin User
DJANGO_ADMIN_EMAIL=[email protected]
DJANGO_JWT_ACCESS_TOKEN_LIFETIME_MINUTES=15
DJANGO_JWT_REFRESH_TOKEN_LIFETIME_MINUTES=1440

# Database Configuration
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
POSTGRES_DB=mydatabase
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres_password #pragma: allowlist secret

# AWS Settings
AWS_STORAGE_BUCKET_NAME=my-local-dev-bucket
AWS_REGION_NAME=us-west-2

# External Services
GOOGLE_APPLICATION_CREDENTIALS=path/to/google-credentials.json
API_KEY=your_api_key_here #pragma: allowlist secret
TAPS_SECRET_KEY=your_taps_secret_key_here#pragma: allowlist secret

# Environment
DOMAIN_NAME=localhost
ENVIRONMENT=local
SENTRY_SDK_DSN=https://[email protected]/0
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ dump.rdb
.devcontainer/bash_history

# Environments
.env
#.env.local
.envs/*
!.envs/.example/
my_awesome_project
2 changes: 1 addition & 1 deletion compose/local/django/start
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -o errexit
set -o pipefail
set -o nounset

#python manage.py migrate
python manage.py migrate
#python manage.py createsu
#python manage.py loadfixtures

Expand Down
4 changes: 2 additions & 2 deletions docker-compose.local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
volumes:
- .:/app:z
env_file:
- .env
- .env.local
ports:
- '8000:8000'
command: /start
Expand All @@ -29,6 +29,6 @@ services:
- temp_project_local_postgres_data:/var/lib/postgresql/data
- temp_project_local_postgres_data_backups:/backups
env_file:
- .env
- .env.local
ports:
- '5432:5432'
8 changes: 4 additions & 4 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
- postgres
- redis
env_file:
- .env
- .env.local
command: /start

postgres:
Expand All @@ -24,7 +24,7 @@ services:
- production_postgres_data:/var/lib/postgresql/data
- production_postgres_data_backups:/backups
env_file:
- .env
- .env.local

traefik:
build:
Expand All @@ -38,7 +38,7 @@ services:
- '0.0.0.0:80:80'
- '0.0.0.0:443:443'
env_file:
- .env
- .env.local

redis:
image: docker.io/redis:6
Expand All @@ -48,6 +48,6 @@ services:
context: .
dockerfile: compose/prod/aws/Dockerfile
env_file:
- .env
- .env.local
volumes:
- production_postgres_data_backups:/backups:z

0 comments on commit a3e772d

Please sign in to comment.