diff --git a/.gitignore b/.gitignore index 1d17dae..0f7beb5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,5 @@ .venv +__pycache__ +requirements.txt +poetry.lock +.python-version diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..921df17 --- /dev/null +++ b/docker-compose.yml @@ -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 \ No newline at end of file diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..0896e80 --- /dev/null +++ b/dockerfile @@ -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"] diff --git a/manage.py b/manage.py index 314380c..a4d66a8 100644 --- a/manage.py +++ b/manage.py @@ -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: diff --git a/pyproject.toml b/pyproject.toml index e6edf6e..1123113 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ authors = ["Changmin Kim "] readme = "README.md" [tool.poetry.dependencies] -python = "^3.10" +python = "3.8.10" fastapi = "^0.111.0"