Skip to content

Commit

Permalink
update for port configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
aarongundel committed Oct 22, 2024
1 parent e8c2917 commit 3031230
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docker/production/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ COPY . ${WEB_ROOT}/arches-lingo

# Set default workdir
WORKDIR ${APP_ROOT}

COPY docker/production/default.conf /etc/nginx/sites-available/default
RUN source ${WEB_ROOT}/ENV/bin/activate && pip install . && pip install gunicorn boto boto3 django-storages psutil

# # Set entrypoint
ENTRYPOINT ["../entrypoint.sh"]
CMD ["run_django_server"]
CMD ["run_gunicorn"]

# Expose port 8000
EXPOSE 8000
11 changes: 11 additions & 0 deletions docker/production/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,17 @@ run_django_server() {
exec /bin/bash -c "source ${WEB_ROOT}/ENV/bin/activate && gunicorn arches_lingo.wsgi"
}

# "exec" means that it will finish building???
run_gunicorn() {
echo ""
echo "----- *** RUNNING DJANGO PRODUCTION SERVER *** -----"
echo ""
cd ${APP_ROOT}
echo "Running Django"
exec /bin/bash -c "source ../ENV/bin/activate && (/etc/init.d/nginx start&) && gunicorn arches_rdm_example_project.wsgi"
}


reset_database() {
echo ""
echo "----- RESETTING DATABASE -----"
Expand Down

0 comments on commit 3031230

Please sign in to comment.