diff --git a/Dockerfile b/Dockerfile index a6cd3a3..196858f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,4 +14,4 @@ RUN pip install --upgrade pip && pip install -r requirements.txt COPY . . ENTRYPOINT ["./entrypoint.sh"] -CMD ["gunicorn", "tldtest.wsgi:application", "--bind", "0.0.0.0:8000"] \ No newline at end of file +CMD ["gunicorn", "tldtest.wsgi:application", "--bind", "0.0.0.0:8000", "--timeout", "600"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 53b7208..4cd7b1f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,14 +5,6 @@ services: build: context: . dockerfile: Dockerfile - command: gunicorn tldtest.wsgi:application --bind 0.0.0.0:8000 + command: gunicorn tldtest.wsgi:application --bind 0.0.0.0:8000 --timeout 600 ports: - 8000:8000 - depends_on: - - db - db: - image: postgres:15 - volumes: - - postgres_data:/var/lib/postgresql/data/ -volumes: - postgres_data: diff --git a/entrypoint.sh b/entrypoint.sh index 7fa9552..2a65464 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,16 +1,5 @@ #!/bin/sh -if [ "$DATABASE" = "postgres" ] -then - echo "Waiting for postgres..." - - while ! nc -z $SQL_HOST $SQL_PORT; do - sleep 0.1 - done - - echo "PostgreSQL started" -fi - python manage.py makemigrations # Make migrations python manage.py migrate # Apply database migrations python manage.py collectstatic diff --git a/tldtest/templates/home.html b/tldtest/templates/home.html index 6beb448..7f921f8 100644 --- a/tldtest/templates/home.html +++ b/tldtest/templates/home.html @@ -18,7 +18,7 @@
{% for TLD in object_list %}