Skip to content
Snippets Groups Projects
Commit e914adb8 authored by florimondmanca's avatar florimondmanca
Browse files

execute setup in start.sh script

parent b89e9c2c
No related branches found
No related tags found
1 merge request!1Dockerize app and update TravisCI file
......@@ -17,5 +17,7 @@ script:
# Check that docker images are running
- docker ps | grep nginx_01
- docker ps | grep django_01
# DEBUG: List files in Django container's WORKDIR
- docker exec django_01 ls
# Run the tests inside the Django container
- docker exec django_01 python manage.py test
......@@ -9,14 +9,4 @@ RUN pip3 install gunicorn
WORKDIR /oser-backend/oser_backend
# Collect static files
RUN python3 manage.py collectstatic
# Initialize database
RUN python3 manage.py makemigrations
RUN python3 manage.py migrate
# Initialize admin users
RUN python3 manage.py initadmin
CMD sh ../start.sh
#!/usr/bin/env bash
# Collect static files
python3 manage.py collectstatic
# Initialize database
python3 manage.py makemigrations
python3 manage.py migrate
# Initialize admin users
python3 manage.py initadmin
# Run server
exec gunicorn oser_backend.wsgi:application \
--bind 0.0.0.0:8000 \
--workers 3
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment