diff --git a/assets/.gitkeep b/assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/assets/compose-files/.gitkeep b/assets/compose-files/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/assets/dockerfiles/.gitkeep b/assets/dockerfiles/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/assets/dockerfiles/binary.dockerfile b/assets/dockerfiles/binary.dockerfile new file mode 100644 index 0000000..e369ad5 --- /dev/null +++ b/assets/dockerfiles/binary.dockerfile @@ -0,0 +1,7 @@ +FROM fedora:41 + +RUN dnf install -y socat +WORKDIR /service/ +ADD ./okay /service/okay +RUN chmod +x ./okay +ENTRYPOINT ["socat", "-d", "TCP-LISTEN:3000,reuseaddr,fork", "EXEC:timeout -k 5 30 ./okay"] diff --git a/assets/dockerfiles/crypto.dockerfile b/assets/dockerfiles/crypto.dockerfile new file mode 100644 index 0000000..767cfd1 --- /dev/null +++ b/assets/dockerfiles/crypto.dockerfile @@ -0,0 +1,9 @@ +FROM python:3.6-slim + +RUN apt-get update && apt-get install -y socat gcc g++ make libffi-dev libssl-dev +WORKDIR /service/ +COPY ./requirements.txt ./requirements.txt +RUN pip install -r requirements.txt +ADD ./main.py ./main.py +RUN chmod +x main.py +ENTRYPOINT socat -d TCP-LISTEN:3000,reuseaddr,fork EXEC:'timeout -k 5 30 python3 -u main.py' \ No newline at end of file diff --git a/assets/dockerfiles/web.dockerfile b/assets/dockerfiles/web.dockerfile new file mode 100644 index 0000000..313ac74 --- /dev/null +++ b/assets/dockerfiles/web.dockerfile @@ -0,0 +1,20 @@ +FROM docker.io/oven/bun AS frontend + +WORKDIR /app +COPY frontend/package*.json ./ +RUN bun i +COPY frontend/ . +RUN bun run build + + +FROM python:3.12-slim + +ENV DOCKER=1 +WORKDIR /app + +COPY ./backend/requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt +COPY ./backend/ . +COPY --from=frontend /app/dist /app/frontend + +CMD ["python3", "app.py"] diff --git a/assets/dockerfiles/with-chunks.dockerfile b/assets/dockerfiles/with-chunks.dockerfile new file mode 100644 index 0000000..455f8a6 --- /dev/null +++ b/assets/dockerfiles/with-chunks.dockerfile @@ -0,0 +1,25 @@ +FROM docker.io/oven/bun AS frontend + +WORKDIR /app +COPY frontend/package*.json ./ +RUN bun i +COPY frontend/ . +RUN bun run build + + +FROM python:3.12-slim + +ENV DOCKER=1 +WORKDIR /app + +COPY ./backend/requirements.txt \ +. +RUN pip install --no-cache-dir -r \ +requirements.txt +COPY ./backend/ \ +\ +\ +. +COPY --from=frontend /app/dist /app/frontend + +CMD ["python3", "app.py"]