Skip to content
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

Dev #6

Closed
wants to merge 11 commits into from
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
.venv
__pycache__
requirements.txt
poetry.lock
.python-version
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: '3'
services:
curaz-api-server:
container_name: curaz-api-server
image: curaz/api-server:latest
networks:
- curaz-network
restart: always
ports:
- "8080:8080"

networks:
curaz-network:
driver: bridge
18 changes: 18 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM python:3.8.10
LABEL authors="changmin.kim"
EXPOSE 8080

WORKDIR /curazapiserver
COPY ./manage.py /curazapiserver/manage.py

COPY ./requirements.txt /curazapiserver/requirements.txt
RUN apt-get update && apt-get -y install libgl1-mesa-glx
RUN pip install --upgrade pip && \
pip install --upgrade pip setuptools && \
pip install --no-cache-dir --upgrade -r /curazapiserver/requirements.txt

COPY ./app /curazapiserver/app
# COPY ./resources /curazapiserver/resources
# COPY ./test /curazapiserver/test

ENTRYPOINT ["python", "manage.py", "runserver", "prod"]
2 changes: 1 addition & 1 deletion manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

def run_server(host: Optional[str] = None, port: Optional[int] = None, build:str = "dev") -> None:
host = host or '0.0.0.0'
port = port or 9999
port = port or 8080
if build == "dev":
app = create_app(port)
else:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["Changmin Kim <ckd29672@naver.com>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.10"
python = "3.8.10"
fastapi = "^0.111.0"


Expand Down
Loading