This commit is contained in:
Sotig
2026-05-29 21:16:10 +03:00
parent 778380dc35
commit 0c40983293
35 changed files with 4905 additions and 1 deletions

16
api/docker/Dockerfile Normal file
View File

@@ -0,0 +1,16 @@
FROM fedora:45
RUN dnf install -y golang prusa-slicer f3d glibc-langpack-en nodejs npm && dnf clean all
RUN npm i -g nodemon@3.1.0
ENV LANG=en_US.UTF-8
WORKDIR /src
COPY ../docker/nodemon.json /run/nodemon.json
RUN dnf install fuser unzip -y
ENV LIBGL_ALWAYS_SOFTWARE=1
CMD [ "nodemon", "--config", "docker/nodemon.json" ]

View File

@@ -0,0 +1,22 @@
FROM fedora:45
RUN dnf install -y golang prusa-slicer f3d glibc-langpack-en && dnf clean all
ENV LANG=en_US.UTF-8
WORKDIR /build
COPY ../uvtools /usr/share/uvtools
COPY ../go.mod go.mod
COPY ../go.sum go.sum
COPY ../cmd cmd
COPY ../configs configs
COPY ../internal internal
RUN go build -o /bin/slic3r-api ./cmd
RUN rm -rf /build/*
ENV LIBGL_ALWAYS_SOFTWARE=1
CMD [ "/bin/slic3r-api" ]

7
api/docker/nodemon.json Normal file
View File

@@ -0,0 +1,7 @@
{
"verbose": true,
"ext": "go,mod",
"ignore": ["/src/vendor/*", "/src/build/*", "/src/.git/*"],
"exec": "fuser -n tcp -k 3030 || go run ./cmd",
"signal": "SIGKILL"
}