...
 
Commits (1)
...@@ -49,6 +49,16 @@ ngbuild: ...@@ -49,6 +49,16 @@ ngbuild:
paths: paths:
- "$BUILD_DIR" - "$BUILD_DIR"
docker_image:
stage: deploy
tags:
- kaniko
dependencies:
- ngbuild
script:
- echo "$DOCKER_REGISTRY_CONFIG" > /kaniko/.docker/config.json
- /kaniko/executor --context "$CI_PROJECT_DIR" --dockerfile "$CI_PROJECT_DIR/docker/Dockerfile" --destination "$DOCKER_REGISTRY_HOST/arsnova-app/lite-frontend" --build-arg "ARSNOVA_BUILD_DIR=`echo $BUILD_DIR`"
#review: #review:
# stage: review # stage: review
# script: # script:
......
FROM nginx
LABEL maintainer "Daniel Gerhardt <code@dgerhardt.net>"
ARG ARSNOVA_BUILD_DIR
COPY docker/arsnova.nginx.conf /etc/nginx/conf.d/arsnova.conf
COPY "$ARSNOVA_BUILD_DIR" /opt/arsnova/lite
RUN rm /etc/nginx/conf.d/default.conf
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /opt/arsnova/lite;
location / {
try_files $uri $uri/ /index.html;
gzip on;
gzip_types application/javascript application/json text/css image/svg+xml;
gzip_vary on;
}
}