diff options
| -rw-r--r-- | Dockerfile | 10 | ||||
| -rw-r--r-- | docker-compose.yml | 19 | ||||
| -rw-r--r-- | entrypoint.sh | 17 | ||||
| -rw-r--r-- | thatcomputerscientist/settings.py | 2 |
4 files changed, 6 insertions, 42 deletions
@@ -22,12 +22,12 @@ RUN pip install -r requirements.txt COPY . /shifoo/ -# RUN python manage.py collectstatic --noinput +RUN python manage.py collectstatic --noinput -# RUN python manage.py makemigrations +RUN python manage.py makemigrations -# RUN python manage.py migrate +RUN python manage.py migrate -# EXPOSE 8080 +EXPOSE 8080 -# CMD ["gunicorn", "--bind", ":8080", "--workers", "2", "thatcomputerscientist.wsgi"] +CMD ["gunicorn", "--bind", ":8080", "--workers", "2", "thatcomputerscientist.wsgi"] diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index e171b215..00000000 --- a/docker-compose.yml +++ /dev/null @@ -1,19 +0,0 @@ -version: '3' - -services: - web: - build: . - volumes: - - .:/shifoo - - /home/ubuntu/database/db.sqlite3:/database/db.sqlite3 - - /home/ubuntu/database/images:/shifoo/images - web_migrate: - extends: - service: web - command: python manage.py migrate - web_run: - extends: - service: web - command: python manage.py runserver 0.0.0.0:8000 - ports: - - "8000:8000"
\ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh deleted file mode 100644 index 9760a84d..00000000 --- a/entrypoint.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -# Collect static files -echo "Collect static files" -python manage.py collectstatic --noinput - -# Create database migrations -echo "Create database migrations" -python manage.py makemigrations - -# Apply database migrations -echo "Apply database migrations" -python manage.py migrate - -# Start server -echo "Starting server" -python manage.py runserver 0.0.0.0:8000
\ No newline at end of file diff --git a/thatcomputerscientist/settings.py b/thatcomputerscientist/settings.py index be4054cf..e51a0257 100644 --- a/thatcomputerscientist/settings.py +++ b/thatcomputerscientist/settings.py @@ -153,7 +153,7 @@ CHANNEL_LAYERS = { DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': os.path.join(BASE_DIR, 'db.sqlite3') if os.getenv('ENVIRONMENT') == 'development' else '/database/db.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } } |
