-
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.
Add a docker-compose and start fixing the API
- Loading branch information
Showing
8 changed files
with
97 additions
and
22 deletions.
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,12 @@ | ||
FROM docker.io/library/python:3.11-slim | ||
RUN apt update && apt install -y libxrender1 libxtst6 libxi6 | ||
RUN pip install poetry | ||
COPY poetry.lock pyproject.toml ./ | ||
RUN poetry config virtualenvs.create false \ | ||
&& poetry install --no-interaction --no-ansi | ||
RUN mkdir /app /app/data | ||
RUN adduser --system --no-create-home nonroot | ||
RUN chown -R nonroot /app/data | ||
USER nonroot | ||
WORKDIR /app | ||
CMD [ "uvicorn", "api:app", "--reload", "--host", "0.0.0.0", "--port", "5000"] |
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
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,24 @@ | ||
# A docker-compose file for a two services system. One is the backend, with the Dockerfile in this directory | ||
# the other one is inside frontend. | ||
|
||
version: '3.8' | ||
services: | ||
backend: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.local | ||
ports: | ||
- "5000:5000" | ||
volumes: | ||
- .:/app | ||
- backend_data:/app/data | ||
frontend: | ||
build: frontend/ | ||
ports: | ||
- "3000:3000" | ||
volumes: | ||
- ./frontend/src:/app/src | ||
depends_on: | ||
- backend | ||
volumes: | ||
backend_data: |
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,14 @@ | ||
FROM node:21.4 | ||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
RUN corepack enable | ||
WORKDIR /app | ||
COPY package.json . | ||
RUN pnpm install | ||
COPY tsconfig.json . | ||
COPY tsconfig.node.json . | ||
COPY vite.config.ts . | ||
COPY package.json . | ||
COPY pnpm-lock.yaml . | ||
COPY index.html . | ||
CMD ["pnpm", "run", "dev"] |
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