ui
This commit is contained in:
16
api/docker/Dockerfile
Normal file
16
api/docker/Dockerfile
Normal 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" ]
|
||||
22
api/docker/Dockerfile.prod
Normal file
22
api/docker/Dockerfile.prod
Normal 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
7
api/docker/nodemon.json
Normal 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"
|
||||
}
|
||||
Reference in New Issue
Block a user