forked from F5-Refresh/ideaconcert
-
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.
Merge pull request #1 from bmcho/feature/F5-Refresh#6-bmcho
feat: django 설정 및 hello출력 가능 개발, nginx 셋팅 (F5-Refresh#6)
- Loading branch information
Showing
16 changed files
with
280 additions
and
3 deletions.
There are no files selected for viewing
Empty file.
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,3 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. |
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 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class HelloConfig(AppConfig): | ||
default_auto_field = 'django.db.models.BigAutoField' | ||
name = 'apps.hello' |
Empty file.
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,3 @@ | ||
from django.db import models | ||
|
||
# Create your models here. |
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,3 @@ | ||
from django.test import TestCase | ||
|
||
# Create your tests here. |
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,8 @@ | ||
|
||
from django.urls import path | ||
|
||
from . import views | ||
|
||
urlpatterns = [ | ||
path('', views.index, name='index'), | ||
] |
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 @@ | ||
from django.http import HttpResponse | ||
from django.shortcuts import render | ||
|
||
# Create your views here. | ||
def index(request): | ||
return HttpResponse("Hello") | ||
|
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,32 @@ | ||
version: "3.9" | ||
services: | ||
app: | ||
container_name: app | ||
build: | ||
context: . | ||
dockerfile: dockerfile | ||
env_file: .env | ||
volumes: | ||
- .:/srv/server | ||
restart: always | ||
expose: | ||
- "8000" | ||
networks: | ||
- nginx_bridge | ||
|
||
nginx: | ||
container_name: nginx | ||
image: nginx:latest | ||
volumes: | ||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf | ||
restart: unless-stopped | ||
ports: | ||
- 80:80 | ||
depends_on: | ||
- app | ||
networks: | ||
- nginx_bridge | ||
|
||
networks: | ||
nginx_bridge: | ||
driver: bridge |
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,20 @@ | ||
FROM python:3.9-slim-buster | ||
|
||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV PYTHONUNBUFFERED 1 | ||
ENV DOCKERIZE_VERSION v0.6.1 | ||
|
||
WORKDIR /srv/server | ||
|
||
COPY . /srv/server | ||
|
||
RUN apt update && \ | ||
apt install -y \ | ||
gcc gfortran musl-dev g++ bash wget | ||
|
||
# 의존성 설치 | ||
RUN pip install --upgrade pip | ||
RUN pip install -r requirements.txt | ||
|
||
|
||
CMD ["gunicorn", "--bind", "0:8000", "ideaconcert.wsgi:application"] |
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,22 @@ | ||
worker_processes auto; | ||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http{ | ||
upstream backend { | ||
server app:8000; | ||
} | ||
|
||
server { | ||
listen 80; | ||
|
||
location / { | ||
proxy_pass http://backend; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_set_header Host $http_host; | ||
proxy_redirect off; | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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,17 @@ | ||
[tool.poetry] | ||
name = "ideaconcert" | ||
version = "0.1.0" | ||
description = "" | ||
authors = ["None"] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.8" | ||
Django = "^4.0.6" | ||
gunicorn = "^20.1.0" | ||
python-dotenv = "^0.20.0" | ||
|
||
[tool.poetry.dev-dependencies] | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" |
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 @@ | ||
asgiref==3.5.2; python_version >= "3.8" | ||
backports.zoneinfo==0.2.1; python_version < "3.9" and python_version >= "3.8" | ||
django==4.0.6; python_version >= "3.8" | ||
gunicorn==20.1.0; python_version >= "3.5" | ||
python-dotenv==0.20.0; python_version >= "3.5" | ||
sqlparse==0.4.2; python_version >= "3.8" | ||
tzdata==2022.1; sys_platform == "win32" and python_version >= "3.8" |