1
mirror of https://github.com/RealOrangeOne/notes.git synced 2024-06-26 12:37:02 +01:00

Use dockerfile for production

The static buildpack is deprecated, and this is a lot easier
This commit is contained in:
Jake Howard 2022-09-09 16:39:21 +01:00
parent 60cfb10da6
commit 93bfe5f59b
Signed by: jake
GPG Key ID: 57AFB45680EDD477
5 changed files with 15 additions and 7 deletions

View File

@ -1,2 +0,0 @@
https://github.com/heroku/heroku-buildpack-nodejs
https://github.com/heroku/heroku-buildpack-static

1
.dockerignore Symbolic link
View File

@ -0,0 +1 @@
.gitignore

View File

@ -3,7 +3,7 @@ stages:
- deploy
static:
image: node:alpine
image: node:slim
stage: build
cache:
key: ${CI_COMMIT_REF_SLUG}

13
Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM node:slim as build
ENV NODE_ENV=production
COPY package.json package-lock.json ./
RUN npm ci --no-audit --progress=false --omit=dev
COPY . .
RUN npm run build
FROM theorangeone/website-server:latest
COPY --from=build ./public /srv

View File

@ -1,4 +0,0 @@
{
"root": "public/",
"clean_urls": true
}