mirror of
https://github.com/azaion/admin.git
synced 2026-04-22 08:36:32 +00:00
fix minio scripts
This commit is contained in:
Vendored
-14
@@ -1,14 +0,0 @@
|
|||||||
mkdir -p ~/cdn/data
|
|
||||||
|
|
||||||
certbot certonly --standalone -d cdn.azaion.com
|
|
||||||
|
|
||||||
cd /etc/letsencrypt/live/cdn.azaion.com-0001 || exit
|
|
||||||
|
|
||||||
chmod -R 755 privkey.pem
|
|
||||||
ln -s privkey.pem private.key
|
|
||||||
|
|
||||||
chmod -R 755 fullchain.pem
|
|
||||||
ln -s fullchain.pem public.crt
|
|
||||||
cd ~ || exit
|
|
||||||
|
|
||||||
sh restart-minio.sh
|
|
||||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
mc alias set cdn http://localhost:9020 azaion-cdn-admin AzAA2onCdDmNinnn_CDN_1
|
mc alias set cdn https://cdnapi.azaion.com azaion-cdn-admin AzAA2onCdDmNinnn_CDN_1
|
||||||
|
|
||||||
mc admin user add cdn azaion-cdn-uploader AaazzA2onCuuPlonad_CerrDN_1
|
mc admin user add cdn azaion-cdn-uploader AaazzA2onCuuPlonad_CerrDN_1
|
||||||
mc admin policy create cdn CDNUploadPolicy uploader_policy.json
|
mc admin policy create cdn CDNUploadPolicy uploader_policy.json
|
||||||
|
|||||||
Vendored
+61
@@ -0,0 +1,61 @@
|
|||||||
|
cd /etc/nginx/sites-available || exit
|
||||||
|
tee -a cdn.azaion.com << END
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name cdn.azaion.com;
|
||||||
|
client_max_body_size 20000M;
|
||||||
|
|
||||||
|
return 301 https://\$host\$request_uri; # Redirect HTTP to HTTPS
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443 ssl;
|
||||||
|
server_name cdn.azaion.com;
|
||||||
|
client_max_body_size 20000M;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://localhost:9021; # Proxy to Minio UI on port 9021 (HTTP internally)
|
||||||
|
proxy_set_header Host \$host;
|
||||||
|
proxy_set_header X-Real-IP \$remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto \$scheme;
|
||||||
|
|
||||||
|
# websockets handling
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade \$http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name cdnapi.azaion.com;
|
||||||
|
client_max_body_size 20000M;
|
||||||
|
|
||||||
|
return 301 https://\$host\$request_uri; # Redirect HTTP to HTTPS
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443 ssl;
|
||||||
|
server_name cdnapi.azaion.com;
|
||||||
|
client_max_body_size 20000M;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://localhost:9020; # Proxy to Minio API on port 9020 (HTTP internally)
|
||||||
|
proxy_set_header Host \$host;
|
||||||
|
proxy_set_header X-Real-IP \$remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto \$scheme;
|
||||||
|
|
||||||
|
# websockets handling
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade \$http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
END
|
||||||
|
ln -s /etc/nginx/sites-available/cdn.azaion.com /etc/nginx/sites-enabled/
|
||||||
|
|
||||||
|
nginx -t #check syntax
|
||||||
|
certbot --nginx -d cdn.azaion.com -d cdnapi.azaion.com
|
||||||
|
systemctl restart nginx
|
||||||
Vendored
+3
-5
@@ -1,15 +1,13 @@
|
|||||||
docker stop minio
|
docker stop minio
|
||||||
docker rm minio
|
docker rm minio
|
||||||
|
|
||||||
docker run \
|
docker run \
|
||||||
-p 9020:9000 \
|
-p 9020:9000 \
|
||||||
-p 9021:9001 \
|
-p 9021:9001 \
|
||||||
--name minio \
|
--name minio \
|
||||||
-v ~/minio/data:/data \
|
-v /root/cdn/data:/data \
|
||||||
-v /etc/letsencrypt/live/cdn.azaion.com-0001:/certs \
|
|
||||||
-e "MINIO_ROOT_USER=azaion-cdn-admin" \
|
-e "MINIO_ROOT_USER=azaion-cdn-admin" \
|
||||||
-e "MINIO_ROOT_PASSWORD=AzAA2onCdDmNinnn_CDN_1" \
|
-e "MINIO_ROOT_PASSWORD=AzAA2onCdDmNinnn_CDN_1" \
|
||||||
quay.io/minio/minio server /data \
|
quay.io/minio/minio server /data \
|
||||||
--address ":9000" \
|
--address ":9000" \
|
||||||
--console-address ":9001" \
|
--console-address ":9001"
|
||||||
--certs-dir /certs
|
|
||||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"Version": "2012-10-17",
|
"Version": "2012-10-17",
|
||||||
"Statement": [
|
"Statement": [
|
||||||
{
|
{
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"Version": "2012-10-17",
|
"Version": "2012-10-17",
|
||||||
"Statement": [
|
"Statement": [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user