Skip to content

Commit

Permalink
[feat]: 프로젝트 초기 셋팅
Browse files Browse the repository at this point in the history
  • Loading branch information
seungwooKim99 committed Nov 30, 2021
1 parent 62ed496 commit d25132f
Show file tree
Hide file tree
Showing 17 changed files with 24 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WORKDIR /app

# dependencies for psycopg2-binary
RUN apk add --no-cache mariadb-connector-c-dev
RUN apk update && apk add python3 python3-dev mariadb-dev build-base && pip3 install mysqlclient && apk del python3-dev mariadb-dev build-base
RUN apk update && apk add python3 python3-dev mariadb-dev build-base && pip3 install mysqlclient


# By copying over requirements first, we make sure that Docker will cache
Expand Down
2 changes: 0 additions & 2 deletions api/admin.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from django.contrib import admin

# Register your models here.
2 changes: 0 additions & 2 deletions api/models.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from django.db import models

# Create your models here.
2 changes: 0 additions & 2 deletions api/tests.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from django.test import TestCase

# Create your tests here.
2 changes: 0 additions & 2 deletions api/views.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from django.shortcuts import render

# Create your views here.
4 changes: 2 additions & 2 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ services:
build:
context: ./
dockerfile: Dockerfile.prod
command: gunicorn django-rest-framework-14th.wsgi:application --bind 0.0.0.0:8000
command: gunicorn like-that-house-vote.wsgi:application --bind 0.0.0.0:8000
environment:
DJANGO_SETTINGS_MODULE: django-rest-framework-14th.settings.prod
DJANGO_SETTINGS_MODULE: like-that-house-vote.settings.prod
env_file:
- .env
volumes:
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:

db:
container_name: db
image: mysql:5.7
image: mariadb:latest
restart: always
environment:
MYSQL_ROOT_HOST: '%'
Expand All @@ -28,7 +28,7 @@ services:
DATABASE_PASSWORD: mysql
DATABASE_PORT: 3306
DATABASE_HOST: db
DJANGO_SETTINGS_MODULE: django-rest-framework-14th.settings.dev
DJANGO_SETTINGS_MODULE: like-that-house-vote.settings.dev
restart: always
ports:
- "8000:8000"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
ASGI config for django-rest-framework-14th project.
ASGI config for like-that-house-vote project.
It exposes the ASGI callable as a module-level variable named ``application``.
Expand All @@ -11,6 +11,6 @@

from django.core.asgi import get_asgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django-rest-framework-14th.settings')
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'like-that-house-vote.settings')

application = get_asgi_application()
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Django settings for django-rest-framework-14th project.
Django settings for like-that-house-vote project.
Generated by 'django-admin startproject' using Django 3.0.8.
Expand Down Expand Up @@ -53,7 +53,7 @@
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'django-rest-framework-14th.urls'
ROOT_URLCONF = 'like-that-house-vote.urls'

TEMPLATES = [
{
Expand All @@ -71,7 +71,7 @@
},
]

WSGI_APPLICATION = 'django-rest-framework-14th.wsgi.application'
WSGI_APPLICATION = 'like-that-house-vote.wsgi.application'


# Password validation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from .base import * # noqa
import pymysql
pymysql.install_as_MySQLdb()

DEBUG = True

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""django-rest-framework-14th URL Configuration
"""like-that-house-vote URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
WSGI config for django-rest-framework-14th project.
WSGI config for like-that-house-vote project.
It exposes the WSGI callable as a module-level variable named ``application``.
Expand All @@ -11,6 +11,6 @@

from django.core.wsgi import get_wsgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django-rest-framework-14th.settings')
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'like-that-house-vote.settings')

application = get_wsgi_application()
2 changes: 1 addition & 1 deletion manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django-rest-framework-14th.settings')
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'like-that-house-vote.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
Expand Down
8 changes: 8 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
asgiref==3.2.10
backports.entry-points-selectable==1.1.1
distlib==0.3.3
Django==3.0.8
django-environ==0.4.5
filelock==3.4.0
gunicorn==20.0.4
mysqlclient==2.1.0
platformdirs==2.4.0
PyMySQL==1.0.2
pytz==2020.1
six==1.16.0
sqlparse==0.3.1
virtualenv==20.10.0

0 comments on commit d25132f

Please sign in to comment.