Put public port in .env

This commit is contained in:
Rodrigo 2026-04-21 10:48:59 -03:00
parent 8193e79c19
commit 98c92835ef
2 changed files with 12 additions and 1 deletions

11
.env.example Normal file
View file

@ -0,0 +1,11 @@
DJANGO_SECRET_KEY="django-secret-key"
DEBUG=True
PUBLIC_PORT=8000
DJANGO_LOGLEVEL=info
DJANGO_ALLOWED_HOSTS=localhost
DATABASE_ENGINE=postgresql_psycopg2
DATABASE_NAME=dockerdjango
DATABASE_USERNAME=dbuser
DATABASE_PASSWORD=dbpassword
DATABASE_HOST=db
DATABASE_PORT=5432

View file

@ -16,7 +16,7 @@ services:
build: .
container_name: django-docker
ports:
- "8000:8000"
- "${PUBLIC_PORT}:8000"
depends_on:
- db
environment: