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
8e687a26
Commit
8e687a26
authored
Mar 10, 2018
by
florimondmanca
Browse files
Options
Downloads
Patches
Plain Diff
fix start.sh, fix .dockerignore
parent
824b69c9
No related branches found
No related tags found
1 merge request
!1
Dockerize app and update TravisCI file
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
.dockerignore
+4
-4
4 additions, 4 deletions
.dockerignore
.travis.yml
+0
-8
0 additions, 8 deletions
.travis.yml
Dockerfile
+6
-3
6 additions, 3 deletions
Dockerfile
docker-compose.yml
+0
-2
0 additions, 2 deletions
docker-compose.yml
start.sh
+4
-4
4 additions, 4 deletions
start.sh
with
14 additions
and
21 deletions
.dockerignore
+
4
−
4
View file @
8e687a26
...
...
@@ -3,7 +3,7 @@
.gitignore
.idea
.travis.yml
media/
./
media/
README.md
LICENSE
...
...
@@ -12,13 +12,13 @@ LICENSE
**/*.sqlite3
# Static files (will be collected inside container)
static/
./
static/
# Compiled files
**/*.pyc
# Migrations
# Ignore generated migrations
oser_backend/
*/migrations/*.py
*
*/migrations/*.py
# But keep migrations folders with their __init__.py files
!
oser_backend/
*/migrations/__init__.py
!
*
*/migrations/__init__.py
This diff is collapsed.
Click to expand it.
.travis.yml
+
0
−
8
View file @
8e687a26
sudo
:
required
language
:
python
python
:
-
"
3.6"
services
:
-
docker
install
:
-
pip install -r requirements.txt
# Build and run the Docker images
-
docker-compose up -d --build
...
...
@@ -17,7 +11,5 @@ 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
+
6
−
3
View file @
8e687a26
...
...
@@ -4,9 +4,12 @@ EXPOSE 8000
ADD
. /oser-backend
RUN
pip3
install
-r
oser-backend/requirements.txt
RUN
pip3
install
gunicorn
WORKDIR
/oser-backend/oser_backend
# Debug only
RUN
ls
RUN
pip3
install
-r
../requirements.txt
RUN
pip3
install
gunicorn
CMD
sh ../start.sh
This diff is collapsed.
Click to expand it.
docker-compose.yml
+
0
−
2
View file @
8e687a26
...
...
@@ -6,8 +6,6 @@ services:
gunicorn
:
build
:
.
container_name
:
django_01
volumes
:
-
.:/oser-backend/
expose
:
-
"
8000"
# port where the Django app runs
restart
:
on-failure
...
...
This diff is collapsed.
Click to expand it.
start.sh
+
4
−
4
View file @
8e687a26
#!/usr/bin/env bash
# Collect static files
exec
python
3
manage.py collectstatic
python manage.py collectstatic
# Initialize database
exec
python
3
manage.py makemigrations
exec
python
3
manage.py migrate
python manage.py makemigrations
python manage.py migrate
# Initialize admin users
exec
python
3
manage.py initadmin
python manage.py initadmin
# Run server
exec
gunicorn oser_backend.wsgi:application
\
...
...
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