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
|
||||
networks:
|
||||
- battleship-net
|
||||
- common-infra-nginx
|
||||
- battleship-nginx
|
||||
deploy:
|
||||
mode: replicated
|
||||
restart_policy:
|
||||
@ -53,5 +53,5 @@ services:
|
||||
networks:
|
||||
battleship-net:
|
||||
driver: overlay
|
||||
common-infra-nginx:
|
||||
battleship-nginx:
|
||||
external: true
|
||||
|
@ -3,15 +3,18 @@ version: "3.4"
|
||||
|
||||
services:
|
||||
|
||||
battleship-nginx:
|
||||
nginx:
|
||||
image: mathwave/sprint-repo:battleship-nginx
|
||||
networks:
|
||||
- battleship-net
|
||||
- common-infra-nginx
|
||||
ports:
|
||||
- "1236:80"
|
||||
deploy:
|
||||
mode: replicated
|
||||
restart_policy:
|
||||
condition: any
|
||||
placement:
|
||||
constraints: [node.role == manager]
|
||||
update_config:
|
||||
parallelism: 1
|
||||
order: start-first
|
||||
@ -52,5 +55,3 @@ services:
|
||||
networks:
|
||||
battleship-net:
|
||||
driver: overlay
|
||||
common-infra-nginx:
|
||||
external: true
|
@ -1,6 +1,5 @@
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- deploy-dev
|
||||
- deploy-prod
|
||||
|
||||
@ -16,16 +15,10 @@ build:
|
||||
- docker build -t mathwave/sprint-repo:battleship-nginx 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:
|
||||
before_script:
|
||||
- docker login -u mathwave -p $DOCKERHUB_PASSWORD
|
||||
- docker network create -d overlay --attachable battleship-nginx || true
|
||||
|
||||
deploy-dev:
|
||||
extends:
|
||||
@ -38,7 +31,7 @@ deploy-dev:
|
||||
when: on_success
|
||||
- when: manual
|
||||
script:
|
||||
- docker stack deploy --with-registry-auth -c ./.deploy/deploy-dev.yaml battleship
|
||||
- docker stack deploy -c ./.deploy/deploy-dev.yaml battleship
|
||||
|
||||
deploy-prod:
|
||||
extends:
|
||||
@ -50,4 +43,4 @@ deploy-prod:
|
||||
- master
|
||||
when: manual
|
||||
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 {
|
||||
server {
|
||||
listen 1238;
|
||||
listen 1236;
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://backend:8000/api/;
|
||||
|
Loading…
Reference in New Issue
Block a user