Docker build
parent
ec313b709a
commit
88c596b60b
@ -0,0 +1,10 @@
|
||||
build:
|
||||
stage: build
|
||||
only:
|
||||
- master
|
||||
image:
|
||||
name: gcr.io/kaniko-project/executor:debug
|
||||
entrypoint: [""]
|
||||
script:
|
||||
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
|
||||
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
|
@ -0,0 +1,10 @@
|
||||
from node:13 as builder
|
||||
workdir /app
|
||||
copy . /app
|
||||
run npm install .
|
||||
run npm run build
|
||||
|
||||
from nginx:latest
|
||||
copy --from=builder /app/build /usr/share/nginx/html
|
||||
copy ./nginx.conf /etc/nginx/conf.d/default.conf
|
||||
expose 80
|
@ -0,0 +1,18 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
error_page 404 /404.html;
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue