-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor + docker-compose-development
- Loading branch information
1 parent
c3a4658
commit 9ab8a84
Showing
42 changed files
with
508 additions
and
347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -195,3 +195,6 @@ dmypy.json | |
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# Poetry | ||
backend/poetry.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM python:3.11-bullseye AS backend | ||
ENV PYTHONUNBUFFERED=1 | ||
WORKDIR /backend | ||
COPY requirements.txt ./ | ||
RUN apt update && apt upgrade -y | ||
RUN pip install -r requirements.txt | ||
COPY docker-entrypoint.sh ./ | ||
RUN chmod +x docker-entrypoint.sh | ||
ENTRYPOINT ["bash", "/backend/docker-entrypoint.sh"] | ||
CMD [ "python", "manage.py", "runserver" ] | ||
|
||
# We will need to revisit this file as this doess't really allow to get rid of dev dependencies | ||
# Look into poetry / pipenv for this | ||
# We'll need to manage migration carefully | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Could be an idea to review naming scheme so as to use: | ||
# from api.constants import files | ||
# then file.ALLOWED_PATH_TYPE, FILE.ALLOWED_PATH_CONTEXT, ... | ||
# and for things like gender | ||
# from api.constants import genders | ||
# then use like:à | ||
# gender.LIST, GENDER.MODEL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Django 4.2 on 2023-05-18 03:47 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('api', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name='post', | ||
options={'ordering': ['-created_at'], 'verbose_name_plural': 'Posts'}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Django 4.2 on 2023-05-18 03:48 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('api', '0002_alter_post_options'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name='comment', | ||
options={'ordering': ['created_at'], 'verbose_name_plural': 'Comments'}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Django 4.2 on 2023-05-18 03:49 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('api', '0003_alter_comment_options'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name='comment', | ||
options={'ordering': ['-created_at'], 'verbose_name_plural': 'Comments'}, | ||
), | ||
] |
Oops, something went wrong.