python version 3.10-alpine --> 3.10-bullseye

This commit is contained in:
Aykhan 2023-07-22 17:22:27 +04:00
parent 631d7fa90b
commit 64272c99aa
4 changed files with 29 additions and 5 deletions

View File

@ -1,6 +1,10 @@
FROM python:3.10-alpine
FROM python:3.10-bullseye
ENV PYTHONUNBUFFERED=1
WORKDIR /code
COPY requirements.txt /code/
RUN pip install -r requirements.txt
COPY src /code/src/

View File

@ -1,6 +1,13 @@
version: "3.9"
services:
db:
image: postgres
volumes:
- dbdata:/var/lib/postgresql/data
env_file:
- ../../config/db/databasepostgresql_env
django:
restart: unless-stopped
environment:
@ -17,4 +24,9 @@ services:
ports:
- "8000:8000"
volumes:
- ../../src:/code/src
- ../../src:/code/src
depends_on:
- db
volumes:
dbdata:

View File

@ -1,7 +1,11 @@
FROM python:3.10-alpine
FROM python:3.10-bullseye
ENV PYTHONUNBUFFERED=1
WORKDIR /code
COPY requirements.txt /code/
RUN pip install -r requirements.txt
COPY src /code/src/
COPY config /code/config/

View File

@ -9,8 +9,12 @@ CSRF_TRUSTED_ORIGINS=['http://127.0.0.1:8000']
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': env('DB_NAME'),
'USER': env('DB_USER'),
'PASSWORD': env('DB_PASSWORD'),
'HOST': 'db',
'PORT': '5432',
}
}