Compare commits
No commits in common. "c0001f43a485f81ed3c2e82f6b8fc1c5c4270db6" and "1204156dd35d17fb5b648e109567c20fdcad6788" have entirely different histories.
c0001f43a4
...
1204156dd3
@ -7,7 +7,7 @@ services:
|
|||||||
image: mathwave/sprint-repo:battleship-nginx
|
image: mathwave/sprint-repo:battleship-nginx
|
||||||
networks:
|
networks:
|
||||||
- battleship-net
|
- battleship-net
|
||||||
- common-infra-nginx
|
- battleship-nginx
|
||||||
deploy:
|
deploy:
|
||||||
mode: replicated
|
mode: replicated
|
||||||
restart_policy:
|
restart_policy:
|
||||||
@ -53,5 +53,5 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
battleship-net:
|
battleship-net:
|
||||||
driver: overlay
|
driver: overlay
|
||||||
common-infra-nginx:
|
battleship-nginx:
|
||||||
external: true
|
external: true
|
||||||
|
@ -3,15 +3,18 @@ version: "3.4"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
battleship-nginx:
|
nginx:
|
||||||
image: mathwave/sprint-repo:battleship-nginx
|
image: mathwave/sprint-repo:battleship-nginx
|
||||||
networks:
|
networks:
|
||||||
- battleship-net
|
- battleship-net
|
||||||
- common-infra-nginx
|
ports:
|
||||||
|
- "1236:80"
|
||||||
deploy:
|
deploy:
|
||||||
mode: replicated
|
mode: replicated
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: any
|
condition: any
|
||||||
|
placement:
|
||||||
|
constraints: [node.role == manager]
|
||||||
update_config:
|
update_config:
|
||||||
parallelism: 1
|
parallelism: 1
|
||||||
order: start-first
|
order: start-first
|
||||||
@ -52,5 +55,3 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
battleship-net:
|
battleship-net:
|
||||||
driver: overlay
|
driver: overlay
|
||||||
common-infra-nginx:
|
|
||||||
external: true
|
|
@ -1,6 +1,5 @@
|
|||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
- test
|
|
||||||
- deploy-dev
|
- deploy-dev
|
||||||
- deploy-prod
|
- deploy-prod
|
||||||
|
|
||||||
@ -16,16 +15,10 @@ build:
|
|||||||
- docker build -t mathwave/sprint-repo:battleship-nginx nginx
|
- docker build -t mathwave/sprint-repo:battleship-nginx nginx
|
||||||
- docker push mathwave/sprint-repo:battleship-nginx
|
- docker push mathwave/sprint-repo:battleship-nginx
|
||||||
|
|
||||||
test:
|
|
||||||
stage: test
|
|
||||||
tags:
|
|
||||||
- dev
|
|
||||||
script:
|
|
||||||
- docker run --rm mathwave/sprint-repo:battleship-back pytest tests
|
|
||||||
|
|
||||||
.deploy:
|
.deploy:
|
||||||
before_script:
|
before_script:
|
||||||
- docker login -u mathwave -p $DOCKERHUB_PASSWORD
|
- docker login -u mathwave -p $DOCKERHUB_PASSWORD
|
||||||
|
- docker network create -d overlay --attachable battleship-nginx || true
|
||||||
|
|
||||||
deploy-dev:
|
deploy-dev:
|
||||||
extends:
|
extends:
|
||||||
@ -38,7 +31,7 @@ deploy-dev:
|
|||||||
when: on_success
|
when: on_success
|
||||||
- when: manual
|
- when: manual
|
||||||
script:
|
script:
|
||||||
- docker stack deploy --with-registry-auth -c ./.deploy/deploy-dev.yaml battleship
|
- docker stack deploy -c ./.deploy/deploy-dev.yaml battleship
|
||||||
|
|
||||||
deploy-prod:
|
deploy-prod:
|
||||||
extends:
|
extends:
|
||||||
@ -50,4 +43,4 @@ deploy-prod:
|
|||||||
- master
|
- master
|
||||||
when: manual
|
when: manual
|
||||||
script:
|
script:
|
||||||
- docker stack deploy --with-registry-auth -c ./.deploy/deploy-prod.yaml battleship
|
- docker stack deploy -c ./.deploy/deploy-prod.yaml battleship
|
||||||
|
@ -2,7 +2,7 @@ events {}
|
|||||||
|
|
||||||
http {
|
http {
|
||||||
server {
|
server {
|
||||||
listen 1238;
|
listen 1236;
|
||||||
|
|
||||||
location /api/ {
|
location /api/ {
|
||||||
proxy_pass http://backend:8000/api/;
|
proxy_pass http://backend:8000/api/;
|
||||||
|
Loading…
Reference in New Issue
Block a user