Dockerfile tested on fedora docker

This commit is contained in:
infidel 2022-11-26 09:47:30 +07:00
parent 55872a1613
commit 7ab49a1b26
2 changed files with 2 additions and 4 deletions

View File

@ -1,12 +1,10 @@
FROM node:16 FROM node:16
WORKDIR /usr/src/app WORKDIR /usr/src/app
COPY package*.json /usr/src/app COPY package*.json /usr/src/app/
RUN npm install RUN npm install
COPY . /usr/src/app COPY . /usr/src/app
RUN npm run build RUN npm run build
RUN npm run build:tailwind
RUN npm run build:fontawesome RUN npm run build:fontawesome
RUN chown -R 1000690000:0 "/.npm"
EXPOSE 5000 EXPOSE 5000
CMD ["npm", "start"] CMD ["npm", "start"]

View File

@ -8,7 +8,7 @@
"scripts": { "scripts": {
"build": "rollup -c", "build": "rollup -c",
"dev": "rollup -c -w", "dev": "rollup -c -w",
"start": "sirv public -s", "start": "sirv public -s -H",
"build:tailwind": "tailwind build public/assets/styles/index.css -o public/assets/styles/tailwind.css", "build:tailwind": "tailwind build public/assets/styles/index.css -o public/assets/styles/tailwind.css",
"build:fontawesome": "mkdir -p public/assets/vendor/@fortawesome/fontawesome-free/webfonts && mkdir -p public/assets/vendor/@fortawesome/fontawesome-free/css && cp -a ./node_modules/@fortawesome/fontawesome-free/webfonts public/assets/vendor/@fortawesome/fontawesome-free/ && cp ./node_modules/@fortawesome/fontawesome-free/css/all.min.css public/assets/vendor/@fortawesome/fontawesome-free/css/all.min.css", "build:fontawesome": "mkdir -p public/assets/vendor/@fortawesome/fontawesome-free/webfonts && mkdir -p public/assets/vendor/@fortawesome/fontawesome-free/css && cp -a ./node_modules/@fortawesome/fontawesome-free/webfonts public/assets/vendor/@fortawesome/fontawesome-free/ && cp ./node_modules/@fortawesome/fontawesome-free/css/all.min.css public/assets/vendor/@fortawesome/fontawesome-free/css/all.min.css",
"install:clean": "rm -rf node_modules/ && rm -rf package-lock.json && rm -rf public/build && npm install && npm run build:tailwind && npm run build:fontawesome && npm run dev" "install:clean": "rm -rf node_modules/ && rm -rf package-lock.json && rm -rf public/build && npm install && npm run build:tailwind && npm run build:fontawesome && npm run dev"