Updated Configuration
This commit is contained in:
@@ -4,13 +4,16 @@ image: docker:latest
|
|||||||
services:
|
services:
|
||||||
- docker:dind
|
- docker:dind
|
||||||
|
|
||||||
|
variables:
|
||||||
|
DOMAIN: "Fluttershub.com"
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||||
|
|
||||||
build-master:
|
build-master:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- docker build --pull -t "$CI_REGISTRY_IMAGE" .
|
- docker build --pull --label traefik.frontend.rule="Host:${DOMAIN}" -t "$CI_REGISTRY_IMAGE" .
|
||||||
- docker push "$CI_REGISTRY_IMAGE"
|
- docker push "$CI_REGISTRY_IMAGE"
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
@@ -18,7 +21,7 @@ build-master:
|
|||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
|
- docker build --pull --label traefik.frontend.rule="Host:${CI_COMMIT_REF_SLUG}.fluttershub.com" -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
|
||||||
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
|
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
|
||||||
except:
|
except:
|
||||||
- master
|
- master
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ COPY docker/nginx.conf /etc/nginx/nginx.conf
|
|||||||
COPY docker/web.conf /etc/nginx/conf.d/web.conf
|
COPY docker/web.conf /etc/nginx/conf.d/web.conf
|
||||||
|
|
||||||
LABEL traefik.backend=fluttershub_home
|
LABEL traefik.backend=fluttershub_home
|
||||||
LABEL traefik.frontend.rule="Host:fluttershub.com"
|
LABEL traefik.frontend.rule="Host:${CI_COMMIT_REF_SLUG}fluttershub.com"
|
||||||
LABEL traefik.docker.network=web
|
LABEL traefik.docker.network=web
|
||||||
LABEL traefik.frontend.redirect.entryPoint=https
|
LABEL traefik.frontend.redirect.entryPoint=https
|
||||||
LABEL traefik.enable=true
|
LABEL traefik.enable=true
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ version: "3"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
home:
|
home:
|
||||||
image: mrflutters/home:1.0.0
|
image: registry.gitlab.com/mrflutters/flutters-website-dockertesting:dev
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
- web
|
- external
|
||||||
container_name: Fluttershub_home
|
container_name: Fluttershub_home
|
||||||
networks:
|
networks:
|
||||||
web:
|
external:
|
||||||
external: true
|
external: true
|
||||||
|
|||||||
Reference in New Issue
Block a user