initial
All checks were successful
Deploy Prod / Build (pull_request) Successful in 6s
Deploy Prod / Push (pull_request) Successful in 10s
Deploy Prod / Deploy prod (pull_request) Successful in 13s

This commit is contained in:
Egor Matveev 2025-09-17 18:46:30 +03:00
commit c25b464b0d
7 changed files with 166 additions and 0 deletions

37
.deploy/deploy-dev.yaml Normal file
View File

@ -0,0 +1,37 @@
version: "3.4"
services:
certupdater:
image: mathwave/sprint-repo:certupdater
command: worker
environment:
MINIO_SECRET_KEY: $MINIO_SECRET_KEY_DEV
MONGO_PASSWORD: $MONGO_PASSWORD_DEV
STAGE: "development"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- configurator
- queues-development
- minio-development
- mongo-development
deploy:
mode: replicated
restart_policy:
condition: any
placement:
constraints: [node.labels.stage == development]
update_config:
parallelism: 1
order: start-first
networks:
configurator:
external: true
queues-development:
external: true
minio-development:
external: true
mongo-development:
external: true

21
.deploy/deploy-prod.yaml Normal file
View File

@ -0,0 +1,21 @@
version: "3.4"
services:
certupdater:
image: mathwave/sprint-repo:setka
networks:
- common-infra-nginx
deploy:
mode: replicated
restart_policy:
condition: any
placement:
constraints: [node.labels.stage == production]
update_config:
parallelism: 1
order: start-first
networks:
common-infra-nginx:
external: true

View File

@ -0,0 +1,41 @@
name: Deploy Dev
on:
pull_request:
branches:
- dev
types: [closed]
jobs:
build:
name: Build
runs-on: [ dev ]
steps:
- name: login
run: docker login -u mathwave -p ${{ secrets.DOCKERHUB_PASSWORD }}
- name: checkout
uses: actions/checkout@v4
with:
ref: dev
- name: build
run: docker build -t mathwave/sprint-repo:setka .
push:
name: Push
runs-on: [ dev ]
needs: build
steps:
- name: push
run: docker push mathwave/sprint-repo:setka
deploy-dev:
name: Deploy dev
runs-on: [prod]
needs: push
steps:
- name: login
run: docker login -u mathwave -p ${{ secrets.DOCKERHUB_PASSWORD }}
- name: checkout
uses: actions/checkout@v4
with:
ref: dev
- name: deploy
run: docker stack deploy --with-registry-auth -c ./.deploy/deploy-dev.yaml setka-development

View File

@ -0,0 +1,41 @@
name: Deploy Prod
on:
pull_request:
branches:
- prod
types: [closed]
jobs:
build:
name: Build
runs-on: [ dev ]
steps:
- name: login
run: docker login -u mathwave -p ${{ secrets.DOCKERHUB_PASSWORD }}
- name: checkout
uses: actions/checkout@v4
with:
ref: prod
- name: build
run: docker build -t mathwave/sprint-repo:setka .
push:
name: Push
runs-on: [ dev ]
needs: build
steps:
- name: push
run: docker push mathwave/sprint-repo:setka
deploy-prod:
name: Deploy prod
runs-on: [prod]
needs: push
steps:
- name: login
run: docker login -u mathwave -p ${{ secrets.DOCKERHUB_PASSWORD }}
- name: checkout
uses: actions/checkout@v4
with:
ref: prod
- name: deploy
run: docker stack deploy --with-registry-auth -c ./.deploy/deploy-prod.yaml setka

5
Dockerfile Normal file
View File

@ -0,0 +1,5 @@
FROM nginx
COPY index.html /nginx/index.html
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 1238

8
index.html Normal file
View File

@ -0,0 +1,8 @@
<html>
<head>
<script>
window.location.href = "https://setka.ru/surfing"
</script>
</head>
<body></body>
</html>

13
nginx.conf Normal file
View File

@ -0,0 +1,13 @@
http {
server {
listen 1238;
root /nginx;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}
}
events {}