From 206cab82250287ac851c889ba07d2702d2e58f67 Mon Sep 17 00:00:00 2001 From: ybkang1108 Date: Wed, 31 Jul 2024 18:02:18 +0900 Subject: [PATCH 1/3] =?UTF-8?q?chore:=20cd=20=EC=9B=8C=ED=81=AC=ED=94=8C?= =?UTF-8?q?=EB=A1=9C=EC=9A=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + accounts/migrations/0001_initial.py | 158 ++++++++++++++++++++++++++++ accounts/migrations/__init__.py | 0 media/default_profile_pic.jpg | Bin 0 -> 6649 bytes myapp/migrations/__init__.py | 0 5 files changed, 159 insertions(+) create mode 100644 accounts/migrations/0001_initial.py create mode 100644 accounts/migrations/__init__.py create mode 100644 media/default_profile_pic.jpg create mode 100644 myapp/migrations/__init__.py diff --git a/.gitignore b/.gitignore index 158121c..ac06ba2 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ db.sqlite3 .env.prod venv/ mguvenv/ +Python-3.12.0/ diff --git a/accounts/migrations/0001_initial.py b/accounts/migrations/0001_initial.py new file mode 100644 index 0000000..4d5fa7c --- /dev/null +++ b/accounts/migrations/0001_initial.py @@ -0,0 +1,158 @@ +# Generated by Django 4.2.14 on 2024-07-28 18:11 + +import django.contrib.auth.models +import django.contrib.auth.validators +from django.db import migrations, models +import django.utils.timezone + + +class Migration(migrations.Migration): + initial = True + + dependencies = [ + ("auth", "0012_alter_user_first_name_max_length"), + ] + + operations = [ + migrations.CreateModel( + name="User", + fields=[ + ( + "id", + models.BigAutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("password", models.CharField(max_length=128, verbose_name="password")), + ( + "last_login", + models.DateTimeField( + blank=True, null=True, verbose_name="last login" + ), + ), + ( + "is_superuser", + models.BooleanField( + default=False, + help_text={ + "Designates that this user has all " + "permissions without explicitly assigning them." + }, + verbose_name="superuser status", + ), + ), + ( + "username", + models.CharField( + error_messages={ + "unique": "A user with that username already exists." + }, + help_text={ + "Required. 150 characters or fewer. " + "Letters, digits and @/./+/-/_ only." + }, + max_length=150, + unique=True, + validators=[ + django.contrib.auth.validators.UnicodeUsernameValidator() + ], + verbose_name="username", + ), + ), + ( + "first_name", + models.CharField( + blank=True, max_length=150, verbose_name="first name" + ), + ), + ( + "last_name", + models.CharField( + blank=True, max_length=150, verbose_name="last name" + ), + ), + ( + "is_staff", + models.BooleanField( + default=False, + help_text={ + "Designates whether the user can " + "log into this admin site." + }, + verbose_name="staff status", + ), + ), + ( + "is_active", + models.BooleanField( + default=True, + help_text={ + "Designates whether this user should be " + "treated as active. Unselect this instead " + "of deleting accounts." + }, + verbose_name="active", + ), + ), + ( + "date_joined", + models.DateTimeField( + default=django.utils.timezone.now, verbose_name="date joined" + ), + ), + ("email", models.EmailField(max_length=254, unique=True)), + ( + "name", + models.CharField( + error_messages={"unique": "이미 사용 중인 닉네임입니다."}, + max_length=20, + unique=True, + ), + ), + ( + "profile_pic", + models.ImageField( + default="default_profile_pic.jpg", upload_to="profile_pics" + ), + ), + ("reliability", models.IntegerField(default=100)), + ( + "groups", + models.ManyToManyField( + blank=True, + help_text={ + "The groups this user belongs to. " + "A user will get all permissions granted " + "to each of their groups." + }, + related_name="user_set", + related_query_name="user", + to="auth.group", + verbose_name="groups", + ), + ), + ( + "user_permissions", + models.ManyToManyField( + blank=True, + help_text="Specific permissions for this user.", + related_name="user_set", + related_query_name="user", + to="auth.permission", + verbose_name="user permissions", + ), + ), + ], + options={ + "verbose_name": "user", + "verbose_name_plural": "users", + "abstract": False, + }, + managers=[ + ("objects", django.contrib.auth.models.UserManager()), + ], + ), + ] diff --git a/accounts/migrations/__init__.py b/accounts/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/media/default_profile_pic.jpg b/media/default_profile_pic.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c5544038e40cb9f9dd1b7a90fab4a3a5974d41cb GIT binary patch literal 6649 zcm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8HqA9+xjFOhcO$iY6_cnC}%Yt02?r1qC_>S67Ao>XWMt%a31yYvLvQ<4blbef9>Hs zVrGr|6CxOXq+K(kAxHFnwLESk0QWFtgB0MP%8XyUSkSsfWe%!(W;~#4fbP2Nv)YqF zCwNqN)_i-o@sSjefd(@bhiG+*ej{&W#2E6`{oF9v3vQKnrTa^z6o0+O?~VK485fF9 dt|q)BbOoEoP8UG?9{<#!sVKaZuaQNB{ttGHc0B+9 literal 0 HcmV?d00001 diff --git a/myapp/migrations/__init__.py b/myapp/migrations/__init__.py new file mode 100644 index 0000000..e69de29 From cbf57c40964b18400d9d7c05811fb8c31b088815 Mon Sep 17 00:00:00 2001 From: ybkang1108 Date: Wed, 31 Jul 2024 18:04:56 +0900 Subject: [PATCH 2/3] =?UTF-8?q?chore:=20cd=20=EC=9B=8C=ED=81=AC=ED=94=8C?= =?UTF-8?q?=EB=A1=9C=EC=9A=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f3eebaf..6a7d401 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,13 +23,13 @@ jobs: host: ${{ secrets.HOST }} username: ubuntu key: ${{ secrets.KEY }} - script: mkdir -p /home/ubuntu/srv/ubuntu + script: mkdir -p /home/ubuntu/MGU-Yulliy-server - name: copy source via ssh key uses: burnett01/rsync-deployments@4.1 with: switches: -avzr --delete - remote_path: /home/ubuntu/srv/ubuntu/ + remote_path: /home/ubuntu/MGU-Yulliy-server remote_host: ${{ secrets.HOST }} remote_user: ubuntu remote_key: ${{ secrets.KEY }} @@ -41,4 +41,5 @@ jobs: username: ubuntu key: ${{ secrets.KEY }} script: | - sh /home/ubuntu/srv/ubuntu/config/scripts/deploy.sh + sh /home/ubuntu/MGU-Yulliy-server + sudo docker-compose up --build -d From b51eadc8f0ea0f413f9afbbe39bb327cbde550e0 Mon Sep 17 00:00:00 2001 From: ybkang1108 Date: Wed, 31 Jul 2024 18:09:40 +0900 Subject: [PATCH 3/3] =?UTF-8?q?chore:=20cd=20=EC=9B=8C=ED=81=AC=ED=94=8C?= =?UTF-8?q?=EB=A1=9C=EC=9A=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6a7d401..5722815 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -41,5 +41,5 @@ jobs: username: ubuntu key: ${{ secrets.KEY }} script: | - sh /home/ubuntu/MGU-Yulliy-server - sudo docker-compose up --build -d + chmod +x /home/ubuntu/MGU-Yulliy-server/config/scripts/deploy.sh + /home/ubuntu/MGU-Yulliy-server/config/scripts/deploy.sh