Compare commits

..

10 Commits

Author SHA1 Message Date
Administrator
c0001f43a4 nginx port 2022-10-20 00:08:10 +03:00
Administrator
609a786e51 nginx port 2022-10-19 23:44:35 +03:00
Administrator
1d94994b97 common-infra-nginx 2022-10-18 20:36:00 +03:00
Administrator
dcde7c5918 battleship driver 2022-10-18 20:10:32 +03:00
Administrator
61d54b5d4b Merge remote-tracking branch 'origin/master' 2022-10-18 18:27:17 +03:00
Administrator
2678766ba9 deploy networks 2022-10-18 18:27:10 +03:00
f768bd549a Update .gitlab-ci.yml 2022-10-04 15:46:45 +00:00
Administrator
c34175b262 fix 2022-09-12 11:59:48 +03:00
Administrator
db691ae411 test stage 2022-09-12 11:53:13 +03:00
Administrator
f5e91977e7 prod 2022-08-30 22:08:45 +03:00
4 changed files with 17 additions and 11 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -2,7 +2,7 @@ events {}
http {
server {
listen 1236;
listen 1238;
location /api/ {
proxy_pass http://backend:8000/api/;