last commit before dropping the idea of multi-stage builds
This commit is contained in:
parent
d0acd97618
commit
ef004ded24
@ -5,5 +5,5 @@ SQL_ENGINE=django.db.backends.postgresql
|
|||||||
SQL_DATABASE=bloonsworld
|
SQL_DATABASE=bloonsworld
|
||||||
SQL_USER=bloonsworld
|
SQL_USER=bloonsworld
|
||||||
SQL_PASSWORD=password123
|
SQL_PASSWORD=password123
|
||||||
SQL_HOST=db
|
SQL_HOST=bloonsworld-db
|
||||||
SQL_PORT=5432
|
SQL_PORT=5432
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
@ -3,4 +3,5 @@ legacy
|
|||||||
venv
|
venv
|
||||||
.env
|
.env
|
||||||
*.sqlite3
|
*.sqlite3
|
||||||
*.db
|
*.db
|
||||||
|
docker-compose.yml
|
||||||
@ -1,6 +1,6 @@
|
|||||||
# https://testdriven.io/blog/dockerizing-django-with-postgres-gunicorn-and-nginx/
|
# https://testdriven.io/blog/dockerizing-django-with-postgres-gunicorn-and-nginx/
|
||||||
|
|
||||||
FROM python:3.12.2-slim-buster as builder
|
FROM python:3.13.2-slim-bullseye AS builder
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
@ -14,13 +14,13 @@ RUN apt-get update && \
|
|||||||
pip install flake8==6.0.0
|
pip install flake8==6.0.0
|
||||||
|
|
||||||
COPY . /usr/src/app/
|
COPY . /usr/src/app/
|
||||||
RUN flake8 --ignore=E501,F401 .
|
# RUN flake8 --ignore=E501,F401 .
|
||||||
|
|
||||||
COPY ./requirements.txt .
|
COPY ./requirements.txt .
|
||||||
RUN pip wheel --no-cache-dir --no-deps --wheel-dir /usr/src/app/wheels -r requirements.txt
|
RUN pip wheel --no-cache-dir --no-deps --wheel-dir /usr/src/app/wheels -r requirements.txt
|
||||||
|
|
||||||
|
|
||||||
FROM python:3.12.2-alpine3.21
|
FROM python:3.13.2-alpine3.21
|
||||||
|
|
||||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||||
PYTHONUNBUFFERED=1 \
|
PYTHONUNBUFFERED=1 \
|
||||||
@ -31,7 +31,7 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
|
|||||||
RUN mkdir -p $HOME && \
|
RUN mkdir -p $HOME && \
|
||||||
mkdir $APP_HOME && \
|
mkdir $APP_HOME && \
|
||||||
addgroup --system app && \
|
addgroup --system app && \
|
||||||
adduser --system --group app
|
adduser --system -G app app
|
||||||
|
|
||||||
WORKDIR $APP_HOME
|
WORKDIR $APP_HOME
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@ django-crispy-forms==2.3
|
|||||||
crispy-bootstrap4==2024.10
|
crispy-bootstrap4==2024.10
|
||||||
django-extensions==3.2.3
|
django-extensions==3.2.3
|
||||||
tqdm==4.67.1
|
tqdm==4.67.1
|
||||||
Pillow==11.1.0
|
Pillow==11.*
|
||||||
django-resized==1.0.3
|
django-resized==1.0.3
|
||||||
django-cleanup==9.0.0
|
django-cleanup==9.0.0
|
||||||
psycopg2-binary==2.9.10
|
psycopg2-binary==2.9.10
|
||||||
@ -2,9 +2,9 @@ services:
|
|||||||
bloonsworld:
|
bloonsworld:
|
||||||
build: ./app
|
build: ./app
|
||||||
volumes:
|
volumes:
|
||||||
- ./.media:/app/media:ro
|
- ./.data/media:/app/media:ro
|
||||||
- ./.static:/app/static:rw
|
- ./.data/static:/app/static:rw
|
||||||
- ./.django:/app/data:rw
|
- ./.data/django:/app/data:rw
|
||||||
command:
|
command:
|
||||||
- sh
|
- sh
|
||||||
- -c
|
- -c
|
||||||
@ -23,7 +23,7 @@ services:
|
|||||||
bloonsworld-db:
|
bloonsworld-db:
|
||||||
image: postgres:17
|
image: postgres:17
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data/
|
- ./.data/postgres_data:/var/lib/postgresql/data/
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_USER=$SQL_USER
|
- POSTGRES_USER=$SQL_USER
|
||||||
- POSTGRES_PASSWORD=$SQL_PASSWORD
|
- POSTGRES_PASSWORD=$SQL_PASSWORD
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user