feat: first version
Some checks failed
Build, check & Test / run (push) Failing after 39s

Signed-off-by: Florian BOUILLON <f.bouillon@aptatio.com>
This commit is contained in:
2023-07-20 17:41:16 +02:00
parent 2bd59f902f
commit 09ed4c487d
80 changed files with 1171 additions and 2755 deletions

View File

@ -1,13 +1,9 @@
# This Dockerfile allows you to run Astro using @astro/node integration
# This Dockerfile allows you to run AstroJS in server mode
#########
# Build #
#########
FROM node:20-alpine as BUILD_IMAGE
# External deps (for node-gyp add: "python3 make g++")
# git is used to install the npm packages with git deps
RUN apk add --no-cache git
FROM docker.io/node:20-alpine as BUILD_IMAGE
# run as non root user
USER node
@ -27,36 +23,17 @@ ADD --chown=node:node . .
# build
RUN npm run build
# remove dev deps
RUN npm prune --omit=dev
##############
# Production #
##############
FROM node:20-slim as PROD_IMAGE
FROM docker.io/node:20-alpine as PROD_IMAGE
# inform software to be in production
ENV NODE_ENV=production
ENV HOST=0.0.0.0
ENV ASTRO_TELEMETRY_DISABLED=true
# Download & Install Slic3r
# RUN apt-get update \
# && apt-get install -y --no-install-recommends \
# slic3r \
# && rm -rf /var/lib/apt/lists/*
# ENV SLICER_PATH slic3r
# Download & install PrusaSlicer
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
prusa-slicer bzip2 libglu1-mesa-dev libegl-dev \
&& apt-get remove prusa-slicer -y \
&& rm -rf /var/lib/apt/lists/*
ADD https://github.com/prusa3d/PrusaSlicer/releases/download/version_2.6.0/PrusaSlicer-2.6.0+linux-x64-GTK3-202306191220.tar.bz2 ./
RUN tar -xvf PrusaSlicer-2.6.0+linux-x64-GTK3-202306191220.tar.bz2 -C /opt
ENV PATH /opt/PrusaSlicer-2.6.0+linux-x64-GTK3-202306191220/bin:$PATH
ENV SLICER_PATH prusa-slicer
# run as non root user
USER node
@ -64,11 +41,6 @@ USER node
# go to work folder
WORKDIR /home/node
# download & Install Bambu Studio
# ADD --chown=node:node https://github.com/bambulab/BambuStudio/releases/download/v01.05.00.61/Bambu_Studio_linux_fedora_v01.05.00.61_20230314200047.AppImage ./
# ENV SLICER_PATH /home/node/Bambu_Studio_linux_fedora_v01.05.00.61_20230314200047.AppImage
# RUN chmod +x /home/node/Bambu_Studio_linux_fedora_v01.05.00.61_20230314200047.AppImage
# copy from build image
COPY --chown=node:node --from=BUILD_IMAGE /home/node/node_modules ./node_modules
COPY --chown=node:node --from=BUILD_IMAGE /home/node/dist ./dist