-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #3 Configuration of dockerfile for deploy
- Loading branch information
Showing
6 changed files
with
61 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.venv | ||
media | ||
static | ||
environment/* |
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,14 @@ | ||
FROM python:3.12.4 | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
RUN python -m pip install --user pipx | ||
RUN python -m pipx ensurepath | ||
RUN python -m pipx install poetry | ||
RUN python -m pipx run poetry install | ||
|
||
EXPOSE 8000 | ||
# CMD sh | ||
CMD python -m pipx run poetry run daphne myFacegram.asgi:application -b 0.0.0.0 -p 8000 |
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,6 @@ | ||
SECRET_KEY=$SECRET_KEY | ||
AWS_ACCOUNT_ID=$AWS_ACCOUNT_ID | ||
AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID | ||
AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY | ||
AWS_STORAGE_BUCKET_NAME=$AWS_STORAGE_BUCKET_NAME | ||
PROD_HOST=$PROD_HOST |
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 |
---|---|---|
|
@@ -30,6 +30,7 @@ | |
ALLOWED_HOSTS = [ | ||
'127.0.0.1', | ||
'localhost', | ||
os.environ["PROD_HOST"] | ||
] | ||
|
||
|
||
|
28 changes: 28 additions & 0 deletions
28
users/migrations/0014_alter_profile_birthday_alter_profile_birthmonth_and_more.py
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,28 @@ | ||
# Generated by Django 5.0.6 on 2024-06-24 18:32 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('users', '0013_auto_20201026_1925'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='profile', | ||
name='birthday', | ||
field=models.IntegerField(blank=True, default='0', unique_for_date=True), | ||
), | ||
migrations.AlterField( | ||
model_name='profile', | ||
name='birthmonth', | ||
field=models.IntegerField(blank=True, default='0', unique_for_month=True), | ||
), | ||
migrations.AlterField( | ||
model_name='profile', | ||
name='birthyear', | ||
field=models.IntegerField(blank=True, default='0', unique_for_year=True), | ||
), | ||
] |