Improved Docker compose files for multi-arch configuration

This commit is contained in:
Keannu Bernasol 2023-09-17 19:24:39 +08:00
parent 557c78d4fc
commit 4161e3f89c
2 changed files with 3 additions and 2 deletions

View file

@ -1,6 +1,7 @@
# Use the official Python 3.11 image
# FROM --platform=arm64 python:3.11.4-bookworm
FROM python:3.11.4-bookworm
ARG BUILDPLATFORM
FROM --platform=${BUILDPLATFORM} python:3.11.4-bookworm
ENV PYTHONBUFFERED 1

View file

@ -11,7 +11,7 @@ services:
- "8083:8000" # Expose port 8083 for the web server
environment:
- PYTHONBUFFERED=1
command: ["sh", "-c", "python stude/manage.py custom_migrate && python stude/wait_for_redis.py && python stude/manage.py runserver"]
command: ["sh", "-c", "python stude/manage.py makemigrations && python stude/manage.py custom_migrate && python stude/manage.py runserver"]
volumes:
- .:/code # For hotreloading
depends_on: