1
Fork 0
mirror of https://github.com/RealOrangeOne/notes.git synced 2024-12-22 14:25:59 +00: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
}