File tree Expand file tree Collapse file tree 6 files changed +69
-10
lines changed
Expand file tree Collapse file tree 6 files changed +69
-10
lines changed Original file line number Diff line number Diff line change 11# ETC
22django /composeexample /
33django /data /
4- django /manage.py
54* .sqlite
65! * .example
76* .pem
Original file line number Diff line number Diff line change 1+ ** /__pycache__
2+ ** /.classpath
3+ ** /.dockerignore
4+ ** /.DS_Store
5+ ** /.editorconfig
6+ ** /.env
7+ ** /.git
8+ ** /.github
9+ ** /.gitignore
10+ ** /.project
11+ ** /.settings
12+ ** /.toolstarget
13+ ** /.vs
14+ ** /.vscode
15+ ** /* . * proj.user
16+ ** /* .dbmdl
17+ ** /* .jfm
18+ ** /* .py #
19+ ** /* .py~
20+ ** /* .pyc
21+ ** /azds.yaml
22+ ** /bin
23+ ** /charts
24+ ** /compose *
25+ ** /csv
26+ ** /django
27+ ** /docker-compose *
28+ ** /Dockerfile *
29+ ** /img
30+ ** /node_modules
31+ ** /npm-debug.log
32+ ** /obj
33+ ** /README.md
34+ ** /secrets.dev.yaml
35+ ** /terraform
36+ ** /values.dev.yaml
Original file line number Diff line number Diff line change 11# syntax=docker/dockerfile:1
2- FROM python:3
2+ FROM python:3.10.9-slim-bullseye
33ENV PYTHONDONTWRITEBYTECODE=1
44ENV PYTHONUNBUFFERED=1
5- WORKDIR /code
6- COPY requirements.txt /code/
5+ WORKDIR /app
6+ COPY requirements.txt .
77RUN pip install -r requirements.txt
8- COPY . /code/
8+ COPY . .
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ version: "3.9"
33
44services :
55 db :
6+ platform : linux/arm64/v8
67 image : postgres
78 volumes :
89 - ./data/db:/var/lib/postgresql/data
@@ -11,12 +12,13 @@ services:
1112 - POSTGRES_USER=postgres
1213 - POSTGRES_PASSWORD=postgres
1314 web :
15+ platform : linux/arm64/v8
1416 build : .
15- command : python manage.py runserver 0.0.0.0:8000
17+ command : python manage.py runserver 0.0.0.0:${PORT:- 8000}
1618 volumes :
17- - .:/code
19+ - .:/app
1820 ports :
19- - " 8000: 8000"
21+ - ${PORT:- 8000}:${PORT:- 8000}
2022 environment :
2123 - POSTGRES_NAME=postgres
2224 - POSTGRES_USER=postgres
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python
2+ """Django's command-line utility for administrative tasks."""
3+ import os
4+ import sys
5+
6+
7+ def main ():
8+ """Run administrative tasks."""
9+ os .environ .setdefault ("DJANGO_SETTINGS_MODULE" , "composeexample.settings" )
10+ try :
11+ from django .core .management import execute_from_command_line
12+ except ImportError as exc :
13+ raise ImportError (
14+ "Couldn't import Django. Are you sure it's installed and "
15+ "available on your PYTHONPATH environment variable? Did you "
16+ "forget to activate a virtual environment?"
17+ ) from exc
18+ execute_from_command_line (sys .argv )
19+
20+
21+ if __name__ == "__main__" :
22+ main ()
Original file line number Diff line number Diff line change 1- Django >= 3.0 , < 4.0
2- psycopg2 >= 2.8
1+ django == 4.1.7 ; python_full_version >= "3.10.9" and python_full_version < " 4.0.0"
2+ psycopg2-binary == 2.9.5 ; python_full_version >= "3.10.9" and python_full_version < "4.0.0"
You can’t perform that action at this time.
0 commit comments