diff --git a/Dockerfile b/Dockerfile index ca9b5d3..85cbed9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,6 @@ FROM django:onbuild +RUN apt-get update && apt-get install -y \ + netcat + CMD ./start.sh diff --git a/config/config.test.ini b/config/config.test.ini deleted file mode 100644 index 0666335..0000000 --- a/config/config.test.ini +++ /dev/null @@ -1,7 +0,0 @@ -[DATABASE] -engine = django.db.backends.postgresql_psycopg2 -name = postgres -user = postgres -password = -host = localhost -port = 5432 \ No newline at end of file diff --git a/lesspass/urls.py b/lesspass/urls.py index 153cc5a..3dc64d9 100644 --- a/lesspass/urls.py +++ b/lesspass/urls.py @@ -2,7 +2,7 @@ from django.conf.urls import include, url from django.contrib import admin urlpatterns = [ + url(r'^', include('api.urls')), url(r'^admin/', admin.site.urls), - url(r'^api/', include('api.urls')), url(r'^accounts/', include('allauth.urls')), ] diff --git a/start.sh b/start.sh index f19c263..659265c 100755 --- a/start.sh +++ b/start.sh @@ -1,5 +1,7 @@ #!/bin/sh +while ! nc -z db 5432; do sleep 3; done + python manage.py migrate python manage.py collectstatic --clear --no-input gunicorn lesspass.wsgi:application -w 2 -b :8000