Fix docker build
This commit is contained in:
parent
3ba26a4c53
commit
95453055fc
2 changed files with 15 additions and 17 deletions
22
Dockerfile
22
Dockerfile
|
@ -1,7 +1,7 @@
|
||||||
###########################
|
###########################
|
||||||
# Angular
|
# Angular
|
||||||
###########################
|
###########################
|
||||||
FROM node:alpine as build
|
FROM node:12-alpine as build
|
||||||
|
|
||||||
ENV HOME=/app
|
ENV HOME=/app
|
||||||
|
|
||||||
|
@ -11,11 +11,10 @@ COPY public $HOME/public
|
||||||
|
|
||||||
WORKDIR $HOME
|
WORKDIR $HOME
|
||||||
|
|
||||||
RUN apk add --update --no-cache --virtual .build-deps gcc g++ make libc6-compat python && \
|
RUN apk add --update --no-cache --virtual .build-deps gcc g++ make libc6-compat python git && \
|
||||||
apk add build-base vips-dev fftw-dev build-base --no-cache \
|
apk add vips-dev fftw-dev build-base --no-cache \
|
||||||
--repository https://alpine.global.ssl.fastly.net/alpine/edge/main \
|
--repository http://dl-3.alpinelinux.org/alpine/v3.10/community \
|
||||||
--repository https://alpine.global.ssl.fastly.net/alpine/edge/testing \
|
--repository http://dl-3.alpinelinux.org/alpine/v3.10/main && \
|
||||||
--repository https://alpine.global.ssl.fastly.net/alpine/edge/community && \
|
|
||||||
npm install && \
|
npm install && \
|
||||||
apk del .build-deps gcc g++ make libc6-compat python && \
|
apk del .build-deps gcc g++ make libc6-compat python && \
|
||||||
apk del build-base && \
|
apk del build-base && \
|
||||||
|
@ -24,7 +23,7 @@ RUN apk add --update --no-cache --virtual .build-deps gcc g++ make libc6-compat
|
||||||
###########################
|
###########################
|
||||||
# Server
|
# Server
|
||||||
###########################
|
###########################
|
||||||
FROM node:alpine
|
FROM node:12-alpine as build
|
||||||
|
|
||||||
ENV HOME=/app
|
ENV HOME=/app
|
||||||
|
|
||||||
|
@ -32,11 +31,10 @@ COPY index.mjs package.json server.mjs $HOME/
|
||||||
|
|
||||||
WORKDIR $HOME
|
WORKDIR $HOME
|
||||||
|
|
||||||
RUN apk add --update --no-cache --virtual .build-deps gcc g++ make libc6-compat python && \
|
RUN apk add --update --no-cache --virtual .build-deps gcc g++ make libc6-compat python git && \
|
||||||
apk add build-base vips-dev fftw-dev build-base --no-cache \
|
apk add vips-dev fftw-dev build-base --no-cache \
|
||||||
--repository https://alpine.global.ssl.fastly.net/alpine/edge/main \
|
--repository http://dl-3.alpinelinux.org/alpine/v3.10/community \
|
||||||
--repository https://alpine.global.ssl.fastly.net/alpine/edge/testing \
|
--repository http://dl-3.alpinelinux.org/alpine/v3.10/main && \
|
||||||
--repository https://alpine.global.ssl.fastly.net/alpine/edge/community && \
|
|
||||||
npm install --production && \
|
npm install --production && \
|
||||||
rm -Rf $HOME/.npm $HOME/.npm $HOME/.config && \
|
rm -Rf $HOME/.npm $HOME/.npm $HOME/.config && \
|
||||||
apk del .build-deps gcc g++ make libc6-compat python && \
|
apk del .build-deps gcc g++ make libc6-compat python && \
|
||||||
|
|
|
@ -9,24 +9,24 @@ export default class StaffRoutes {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/** GET: /api/articles */
|
/** GET: /api/staff */
|
||||||
async getAllStaff(ctx) {
|
async getAllStaff(ctx) {
|
||||||
ctx.body = await this.Staff.getAll(ctx, { }, [])
|
ctx.body = await this.Staff.getAll(ctx, { }, [])
|
||||||
}
|
}
|
||||||
|
|
||||||
/** GET: /api/articles/:id */
|
/** GET: /api/staff/:id */
|
||||||
async getSingleStaff(ctx) {
|
async getSingleStaff(ctx) {
|
||||||
ctx.body = await this.Staff.getSingle(ctx.params.id, [], true, ctx)
|
ctx.body = await this.Staff.getSingle(ctx.params.id, [], true, ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** POST: /api/articles */
|
/** POST: /api/staff */
|
||||||
async createStaff(ctx) {
|
async createStaff(ctx) {
|
||||||
await this.security.validUpdate(ctx)
|
await this.security.validUpdate(ctx)
|
||||||
|
|
||||||
ctx.body = await this.Staff.create(ctx.request.body)
|
ctx.body = await this.Staff.create(ctx.request.body)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** PUT: /api/articles/:id */
|
/** PUT: /api/staff/:id */
|
||||||
async updateStaff(ctx) {
|
async updateStaff(ctx) {
|
||||||
await this.security.validUpdate(ctx)
|
await this.security.validUpdate(ctx)
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ export default class StaffRoutes {
|
||||||
ctx.body = page
|
ctx.body = page
|
||||||
}
|
}
|
||||||
|
|
||||||
/** DELETE: /api/articles/:id */
|
/** DELETE: /api/staff/:id */
|
||||||
async removeStaff(ctx) {
|
async removeStaff(ctx) {
|
||||||
let page = await this.Staff.getSingle(ctx.params.id)
|
let page = await this.Staff.getSingle(ctx.params.id)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue