mirror of
https://github.com/RealOrangeOne/notes.git
synced 2024-12-22 15:35:59 +00:00
Use dockerfile for production
The static buildpack is deprecated, and this is a lot easier
This commit is contained in:
parent
60cfb10da6
commit
93bfe5f59b
5 changed files with 15 additions and 7 deletions
|
@ -1,2 +0,0 @@
|
||||||
https://github.com/heroku/heroku-buildpack-nodejs
|
|
||||||
https://github.com/heroku/heroku-buildpack-static
|
|
1
.dockerignore
Symbolic link
1
.dockerignore
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
.gitignore
|
|
@ -3,7 +3,7 @@ stages:
|
||||||
- deploy
|
- deploy
|
||||||
|
|
||||||
static:
|
static:
|
||||||
image: node:alpine
|
image: node:slim
|
||||||
stage: build
|
stage: build
|
||||||
cache:
|
cache:
|
||||||
key: ${CI_COMMIT_REF_SLUG}
|
key: ${CI_COMMIT_REF_SLUG}
|
||||||
|
|
13
Dockerfile
Normal file
13
Dockerfile
Normal 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
|
|
@ -1,4 +0,0 @@
|
||||||
{
|
|
||||||
"root": "public/",
|
|
||||||
"clean_urls": true
|
|
||||||
}
|
|
Loading…
Reference in a new issue