Commit d77e6b45 authored by David Engelhardt's avatar David Engelhardt
Browse files

example ci and dockerfile

parent 4e10bf59
Pipeline #2752 passed with stage
in 3 minutes and 49 seconds
services:
- docker:dind
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
build:
stage: build
script:
- docker build -t $IMAGE_TAG .
- docker push $IMAGE_TAG
FROM google/dart:2.1 AS builder
ENV PATH="${PATH}:/root/.pub-cache/bin"
RUN pub global activate webdev
COPY ./frontend/ /root/build-here/
WORKDIR /root/build-here
RUN pub get && \
webdev build --output web:build
FROM nginx
EXPOSE 80
RUN sed -i -e 's, location / {, location /calendar {,g' /etc/nginx/conf.d/default.conf; \
sed -i -e 's, root /usr/share/nginx/html;, alias /usr/share/nginx/html;,g' /etc/nginx/conf.d/default.conf
COPY --from=builder /root/build-here/build /usr/share/nginx/html
image: google/dart:2.1
before_script:
- pub global activate webdev
pages:
stage: deploy
script:
- pub get
- webdev build --output web:build
- mv build public
artifacts:
paths:
- public
only:
- master
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment