Skip to content

Commit

Permalink
Add container names through env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertoMoreta committed Apr 4, 2024
1 parent 60ccd42 commit edbaf17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ LOGGING_HANDLERS=console,single_thread_file_handler
SECRET_KEY=
ALLOWED_HOSTS=localhost,127.0.0.1,10.0.2.2
ADMINS=[]
DOCKER_WEB_CONTAINER=appmes-web
DOCKER_DB_CONTAINER=appmes-db
DB_ENGINE=django.db.backends.postgresql
DB_NAME=
DB_USER=
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

services:
web:
container_name: ${DOCKER_WEB_CONTAINER}
build: .
command: gunicorn
ports:
Expand All @@ -20,6 +21,7 @@ services:
db:
condition: service_healthy
db:
container_name: ${DOCKER_DB_CONTAINER}
image: postgres:13
ports:
- "5432:5432"
Expand Down

0 comments on commit edbaf17

Please sign in to comment.