Compare commits
10 Commits
1204156dd3
...
c0001f43a4
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c0001f43a4 | ||
![]() |
609a786e51 | ||
![]() |
1d94994b97 | ||
![]() |
dcde7c5918 | ||
![]() |
61d54b5d4b | ||
![]() |
2678766ba9 | ||
f768bd549a | |||
![]() |
c34175b262 | ||
![]() |
db691ae411 | ||
![]() |
f5e91977e7 |
@ -7,7 +7,7 @@ services:
|
||||
image: mathwave/sprint-repo:battleship-nginx
|
||||
networks:
|
||||
- battleship-net
|
||||
- battleship-nginx
|
||||
- common-infra-nginx
|
||||
deploy:
|
||||
mode: replicated
|
||||
restart_policy:
|
||||
@ -53,5 +53,5 @@ services:
|
||||
networks:
|
||||
battleship-net:
|
||||
driver: overlay
|
||||
battleship-nginx:
|
||||
common-infra-nginx:
|
||||
external: true
|
||||
|
@ -3,18 +3,15 @@ version: "3.4"
|
||||
|
||||
services:
|
||||
|
||||
nginx:
|
||||
battleship-nginx:
|
||||
image: mathwave/sprint-repo:battleship-nginx
|
||||
networks:
|
||||
- battleship-net
|
||||
ports:
|
||||
- "1236:80"
|
||||
- common-infra-nginx
|
||||
deploy:
|
||||
mode: replicated
|
||||
restart_policy:
|
||||
condition: any
|
||||
placement:
|
||||
constraints: [node.role == manager]
|
||||
update_config:
|
||||
parallelism: 1
|
||||
order: start-first
|
||||
@ -55,3 +52,5 @@ services:
|
||||
networks:
|
||||
battleship-net:
|
||||
driver: overlay
|
||||
common-infra-nginx:
|
||||
external: true
|
@ -1,5 +1,6 @@
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- deploy-dev
|
||||
- deploy-prod
|
||||
|
||||
@ -15,10 +16,16 @@ 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:
|
||||
@ -31,7 +38,7 @@ deploy-dev:
|
||||
when: on_success
|
||||
- when: manual
|
||||
script:
|
||||
- docker stack deploy -c ./.deploy/deploy-dev.yaml battleship
|
||||
- docker stack deploy --with-registry-auth -c ./.deploy/deploy-dev.yaml battleship
|
||||
|
||||
deploy-prod:
|
||||
extends:
|
||||
@ -43,4 +50,4 @@ deploy-prod:
|
||||
- master
|
||||
when: manual
|
||||
script:
|
||||
- docker stack deploy -c ./.deploy/deploy-prod.yaml battleship
|
||||
- docker stack deploy --with-registry-auth -c ./.deploy/deploy-prod.yaml battleship
|
||||
|
@ -2,7 +2,7 @@ events {}
|
||||
|
||||
http {
|
||||
server {
|
||||
listen 1236;
|
||||
listen 1238;
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://backend:8000/api/;
|
||||
|
Loading…
Reference in New Issue
Block a user