feat: initial dockerized 301 redirect to sag24.ru
nginx:alpine container, listens 8080, returns 301 -> https://sag24.ru$request_uri. Mapped to host port 4083 on web.hhivp.com via docker-compose.
This commit is contained in:
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
.DS_Store
|
||||||
|
*.local
|
||||||
|
docker-compose.override.yml
|
||||||
|
secrets/
|
||||||
9
Dockerfile
Normal file
9
Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# syntax=docker/dockerfile:1.7
|
||||||
|
FROM nginx:1.27-alpine
|
||||||
|
|
||||||
|
COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
|
|
||||||
|
EXPOSE 8080
|
||||||
|
|
||||||
|
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
|
||||||
|
CMD wget -qO- http://127.0.0.1:8080/ -I 2>&1 | grep -q "301 Moved" || exit 1
|
||||||
17
README.md
Normal file
17
README.md
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# sysadmingroup-website
|
||||||
|
|
||||||
|
`sysadmingroup.ru` — алиас-домен для `sag24.ru`.
|
||||||
|
Контейнер `nginx:alpine` отдаёт `301 Moved Permanently` → `https://sag24.ru$request_uri`.
|
||||||
|
|
||||||
|
## Деплой
|
||||||
|
|
||||||
|
На `web.hhivp.com`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd /opt/docker/sites/sysadmingroup-ru
|
||||||
|
git pull
|
||||||
|
docker compose build
|
||||||
|
docker compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
Host nginx vhost (`/etc/nginx/conf.d/sysadmingroup.ru`) терминирует SSL и проксирует на `127.0.0.1:4083`.
|
||||||
21
docker-compose.yml
Normal file
21
docker-compose.yml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
services:
|
||||||
|
sysadmingroup-ru:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
image: sysadmingroup-ru:latest
|
||||||
|
container_name: sysadmingroup-ru
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:4083:8080"
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "wget", "-qO-", "-I", "http://127.0.0.1:8080/"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 3
|
||||||
|
start_period: 5s
|
||||||
|
|
||||||
|
# Деплой на web (45.10.53.206):
|
||||||
|
# - /opt/docker/sites/sysadmingroup-ru/ ← git clone сюда
|
||||||
|
# Команды:
|
||||||
|
# cd /opt/docker/sites/sysadmingroup-ru && git pull && docker compose build && docker compose up -d
|
||||||
21
nginx.conf
Normal file
21
nginx.conf
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
worker_processes auto;
|
||||||
|
error_log /dev/stderr warn;
|
||||||
|
pid /var/run/nginx.pid;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 256;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
server_tokens off;
|
||||||
|
access_log /dev/stdout combined;
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 8080 default_server;
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
return 301 https://sag24.ru$request_uri;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user