Browse Source

add Dockerfile

pull/342/head
Guillaume Vincent 8 years ago
parent
commit
c58e70d887
4 changed files with 6 additions and 8 deletions
  1. +3
    -0
      Dockerfile
  2. +0
    -7
      config/config.test.ini
  3. +1
    -1
      lesspass/urls.py
  4. +2
    -0
      start.sh

+ 3
- 0
Dockerfile View File

@@ -1,3 +1,6 @@
FROM django:onbuild FROM django:onbuild


RUN apt-get update && apt-get install -y \
netcat

CMD ./start.sh CMD ./start.sh

+ 0
- 7
config/config.test.ini View File

@@ -1,7 +0,0 @@
[DATABASE]
engine = django.db.backends.postgresql_psycopg2
name = postgres
user = postgres
password =
host = localhost
port = 5432

+ 1
- 1
lesspass/urls.py View File

@@ -2,7 +2,7 @@ from django.conf.urls import include, url
from django.contrib import admin from django.contrib import admin


urlpatterns = [ urlpatterns = [
url(r'^', include('api.urls')),
url(r'^admin/', admin.site.urls), url(r'^admin/', admin.site.urls),
url(r'^api/', include('api.urls')),
url(r'^accounts/', include('allauth.urls')), url(r'^accounts/', include('allauth.urls')),
] ]

+ 2
- 0
start.sh View File

@@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh


while ! nc -z db 5432; do sleep 3; done

python manage.py migrate python manage.py migrate
python manage.py collectstatic --clear --no-input python manage.py collectstatic --clear --no-input
gunicorn lesspass.wsgi:application -w 2 -b :8000 gunicorn lesspass.wsgi:application -w 2 -b :8000

Loading…
Cancel
Save