-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pokr.kr Dockerize #57
Draft
leegeng
wants to merge
3
commits into
teampopong:master
Choose a base branch
from
leegeng:feature/dockerfile
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+93
−0
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,5 @@ | ||
DB_NAME= | ||
DB_USER= | ||
DB_PASSWORD= | ||
|
||
NGINX_SERVING_PORT= |
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,27 @@ | ||
FROM python:2 | ||
|
||
ENV PYTHONIOENCODING='UTF-8' | ||
ENV LANG=en_US.UTF-8 | ||
ENV LANGUAGE=en_US.UTF-8 | ||
ENV LC_ALL=en_US.UTF-8 | ||
|
||
RUN apt-get update && apt-get install -y git wget && rm -rf /var/lib/apt/lists/* | ||
RUN mkdir -p /pokr.kr && \ | ||
mkdir ~/.pip && echo '[global]\n\ | ||
index-url=http://mirror.kakao.com/pypi/simple/\n\ | ||
trusted-host=mirror.kakao.com' > ~/.pip/pip.conf | ||
|
||
WORKDIR /pokr.kr | ||
ADD . . | ||
RUN pip install --upgrade pip && pip install -r requirements.txt && \ | ||
pip install git+https://github.com/teampopong/popong-models.git && \ | ||
pip install git+https://github.com/teampopong/popong-data-utils.git && \ | ||
pip install git+https://github.com/teampopong/popong-nlp.git && \ | ||
git submodule init && git submodule update | ||
|
||
ADD .conf.samples/alembic.ini.sample /pokr.kr/alembic.ini | ||
ADD .conf.samples/settings.py.sample /pokr.kr/settings.py | ||
#RUN cat /pokr.kr/.conf.samples/alembic.ini.sample | sed 's/ID_HERE/docker/g' | sed 's/PASSWD_HERE/docker/g' | sed 's/HOST_HERE/localhost/g' > ./pokr.kr/alembic.ini | ||
|
||
EXPOSE 8000 | ||
ENTRYPOINT ./entrypoint.sh |
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,58 @@ | ||
version: '3' | ||
services: | ||
db: | ||
image: postgres:11.3 | ||
restart: always | ||
container_name: pokr-db | ||
ports: | ||
- 5432:5432 | ||
environment: | ||
- PGDATA=/data/pgdata | ||
- POSTGRES_DB=${DB_NAME} | ||
- POSTGRES_USER=${DB_USER} | ||
- POSTGRES_PASSWORD=${DB_PASSWORD} | ||
|
||
app: | ||
container_name: pokr-app | ||
build: . | ||
volumes: | ||
- /data:/data | ||
- /tmp:/tmp | ||
- /share:/share | ||
- django-static:/django-static | ||
environment: | ||
- DJANGO_STATIC_ROOT=/django-static | ||
depends_on: | ||
- db | ||
restart: always | ||
logging: | ||
driver: "json-file" | ||
options: | ||
max-size: "100k" | ||
max-file: "10" | ||
|
||
nginx: | ||
image: nginx:stable | ||
container_name: pokr-nginx | ||
restart: always | ||
volumes: | ||
- django-static:/django-static | ||
- ./conf/nginx.conf:/etc/nginx/conf.d/pokr.conf | ||
ports: | ||
- ${NGINX_SERVING_PORT}:80 | ||
command: | ||
- /bin/bash | ||
- -c | ||
- | | ||
rm -f /etc/nginx/conf.d/default.conf | ||
nginx -g 'daemon off;' | ||
depends_on: | ||
- app | ||
logging: | ||
driver: "json-file" | ||
options: | ||
max-size: "100k" | ||
max-file: "10" | ||
|
||
volumes: | ||
django-static: |
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 @@ | ||
#!/bin/sh | ||
|
||
/bin/bash |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
기왕 하시는 김에 python 3.7 기준으로 해보는 것이 어떠세요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
작업중이신 브랜치 베이스로 바꿔볼게요.