diff --git a/.deploy/deploy-dev.yaml b/.deploy/deploy-dev.yaml index cf2bc6c..be9a918 100644 --- a/.deploy/deploy-dev.yaml +++ b/.deploy/deploy-dev.yaml @@ -3,20 +3,15 @@ version: "3.4" services: - nginx: + sprint-nginx: image: mathwave/sprint-repo:sprint-nginx - volumes: - - /sprint-data/static:/var/www/html/static networks: - net - ports: - - "1235:80" + - sprint-nginx deploy: mode: replicated restart_policy: condition: any - placement: - constraints: [node.role == manager] update_config: parallelism: 1 order: start-first @@ -199,3 +194,5 @@ services: networks: net: driver: overlay + sprint-nginx: + external: true \ No newline at end of file diff --git a/.deploy/deploy-prod.yaml b/.deploy/deploy-prod.yaml index 0e4b0c7..7c2a73f 100644 --- a/.deploy/deploy-prod.yaml +++ b/.deploy/deploy-prod.yaml @@ -3,20 +3,15 @@ version: "3.4" services: - nginx: + sprint-nginx: image: mathwave/sprint-repo:sprint-nginx - volumes: - - /sprint-data/static:/var/www/html/static networks: - net - ports: - - "1235:80" + - sprint-nginx deploy: mode: replicated restart_policy: condition: any - placement: - constraints: [node.role == manager] update_config: parallelism: 1 order: start-first @@ -207,3 +202,5 @@ services: networks: net: driver: overlay + sprint-nginx: + external: true diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f6bfc33..94cfb13 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,6 +19,7 @@ build: .deploy: before_script: - docker login -u mathwave -p $DOCKERHUB_PASSWORD + - docker network create -d overlay --attachable sprint-nginx || true deploy-dev: extends: diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 497551e..a1f9cc4 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -2,7 +2,7 @@ events {} http { server { - listen 80; + listen 1235; location /checker/ { proxy_pass http://polling:7998/checker/;