This commit is contained in:
Administrator 2022-08-18 12:49:46 +03:00
parent 1600962042
commit 2ddfd02b3a
7 changed files with 8 additions and 8 deletions

View File

@ -1,9 +1,7 @@
version: "3.6" version: "3.6"
services: services:
nginx: nginx:
image: nginx image: sprint-infra-nginx
volumes:
- ../nginx/nginx-dev.conf:/etc/nginx/nginx.conf
ports: ports:
- "80:80" - "80:80"
deploy: deploy:
@ -64,7 +62,6 @@ services:
gitlab-runner: gitlab-runner:
image: mathwave/sprint-repo:gitlab-runner image: mathwave/sprint-repo:gitlab-runner
volumes: volumes:
- /etc/builds:/etc/builds
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
environment: environment:
GITLAB_REGISTRATION_TOKEN: $GITLAB_REGISTRATION_TOKEN GITLAB_REGISTRATION_TOKEN: $GITLAB_REGISTRATION_TOKEN

View File

@ -2,9 +2,7 @@ version: "3.6"
services: services:
nginx: nginx:
image: nginx image: sprint-infra-nginx
volumes:
- ../nginx/nginx-prod.conf:/etc/nginx/nginx.conf
ports: ports:
- "80:80" - "80:80"
deploy: deploy:
@ -66,7 +64,6 @@ services:
image: mathwave/sprint-repo:gitlab-runner image: mathwave/sprint-repo:gitlab-runner
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- /home:/home
deploy: deploy:
mode: replicated mode: replicated
placement: placement:

View File

@ -11,6 +11,7 @@ deploy-dev:
when: on_success when: on_success
- when: manual - when: manual
script: script:
- docker build -t sprint-infra-nginx nginx/nginx-dev
- docker stack deploy -c ./.deploy/deploy-dev.yaml infra - docker stack deploy -c ./.deploy/deploy-dev.yaml infra
deploy-prod: deploy-prod:
@ -21,4 +22,5 @@ deploy-prod:
- master - master
when: manual when: manual
script: script:
- docker build -t sprint-infra-nginx nginx/nginx-prod
- docker stack deploy -c ./.deploy/deploy-prod.yaml infra - docker stack deploy -c ./.deploy/deploy-prod.yaml infra

View File

@ -0,0 +1,2 @@
FROM nginx
COPY ./nginx-dev.conf /etc/nginx/nginx.conf

View File

@ -0,0 +1,2 @@
FROM nginx
COPY ./nginx-prod.conf /etc/nginx/nginx.conf