Include database file properly

This commit is contained in:
Mark Veidemanis 2022-10-15 22:36:11 +01:00
parent 3b26d413a6
commit 5995ded170
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
4 changed files with 5 additions and 6 deletions

View File

@ -96,7 +96,7 @@ WSGI_APPLICATION = "app.wsgi.application"
DATABASES = { DATABASES = {
"default": { "default": {
"ENGINE": "django.db.backends.sqlite3", "ENGINE": "django.db.backends.sqlite3",
"NAME": BASE_DIR / "db.sqlite3", "NAME": "/conf/db.sqlite3",
} }
} }

View File

@ -50,7 +50,7 @@
</span> </span>
</span> </span>
</button> </button>
</a> </a>
</div> </div>
</td> </td>
</tr> </tr>

View File

@ -6,7 +6,7 @@ services:
build: ${PORTAINER_GIT_DIR}/docker/prod build: ${PORTAINER_GIT_DIR}/docker/prod
volumes: volumes:
- ${PORTAINER_GIT_DIR}:/code - ${PORTAINER_GIT_DIR}:/code
- ${APP_DATABASE_FILE}:/code/db.sqlite3 - ${APP_DATABASE_FILE}:/conf/db.sqlite3
#ports: #ports:
# - "8000:8000" # uwsgi socket # - "8000:8000" # uwsgi socket
env_file: env_file:
@ -27,7 +27,7 @@ services:
command: sh -c '. /venv/bin/activate && python manage.py migrate --noinput' command: sh -c '. /venv/bin/activate && python manage.py migrate --noinput'
volumes: volumes:
- ${PORTAINER_GIT_DIR}:/code - ${PORTAINER_GIT_DIR}:/code
- ${APP_DATABASE_FILE}:/code/db.sqlite3 - ${APP_DATABASE_FILE}:/conf/db.sqlite3
env_file: env_file:
- ../stack.env - ../stack.env
@ -37,7 +37,7 @@ services:
command: sh -c '. /venv/bin/activate && python manage.py collectstatic --noinput' command: sh -c '. /venv/bin/activate && python manage.py collectstatic --noinput'
volumes: volumes:
- ${PORTAINER_GIT_DIR}:/code - ${PORTAINER_GIT_DIR}:/code
- ${APP_DATABASE_FILE}:/code/db.sqlite3 - ${APP_DATABASE_FILE}:/conf/db.sqlite3
env_file: env_file:
- ../stack.env - ../stack.env

View File

@ -13,7 +13,6 @@ server {
} }
location / { location / {
include /etc/nginx/uwsgi_params; # the uwsgi_params file you installed
proxy_pass http://django; proxy_pass http://django;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;