Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
oser-backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hamza Touizrat
oser-backend
Commits
e914adb8
Commit
e914adb8
authored
Mar 10, 2018
by
florimondmanca
Browse files
Options
Downloads
Patches
Plain Diff
execute setup in start.sh script
parent
b89e9c2c
No related branches found
No related tags found
1 merge request
!1
Dockerize app and update TravisCI file
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.travis.yml
+2
-0
2 additions, 0 deletions
.travis.yml
Dockerfile
+0
-10
0 additions, 10 deletions
Dockerfile
start.sh
+11
-0
11 additions, 0 deletions
start.sh
with
13 additions
and
10 deletions
.travis.yml
+
2
−
0
View file @
e914adb8
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Dockerfile
+
0
−
10
View file @
e914adb8
...
...
@@ -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
This diff is collapsed.
Click to expand it.
start.sh
+
11
−
0
View file @
e914adb8
#!/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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment