Skip to content

Commit eebc9ed

Browse files
committed
read port from env file
1 parent b563d45 commit eebc9ed

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

Diff for: .env.example

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ DJANGO_SUPERUSER_EMAIL=
1010
DJANGO_SUPERUSER_PASSWORD=
1111

1212
# REQUIRED app enviornment variables
13+
PORT=8000
1314
SECRET_KEY=
1415
SLACK_API_TOKEN=
1516
SLACK_SIGNING_SECRET=

Diff for: Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ COPY entrypoint.sh /app/entrypoint.sh
3636
RUN chmod +x /app/entrypoint.sh
3737

3838
# Expose the port that the Gunicorn server will run on
39-
EXPOSE 8000
39+
EXPOSE $PORT

Diff for: docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ services:
1010
env_file:
1111
- .env
1212
ports:
13-
- "8000:8000"
13+
- "${PORT}:${PORT}"
1414
depends_on:
1515
- rabbitmq
1616
- celery

Diff for: entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ python manage.py createsuperuser --no-input
1616
service cron start
1717

1818
# Start Gunicorn server
19-
exec gunicorn meetups.wsgi:application --bind 0.0.0.0:8000
19+
exec gunicorn meetups.wsgi:application --bind 0.0.0.0:$PORT

0 commit comments

Comments
 (0)