Set up Minio S3 virtual hosts

This commit is contained in:
Matthew Lopez
2023-12-19 13:58:45 -05:00
parent d28cb8fad8
commit b3030fe598
5 changed files with 5 additions and 6 deletions

View File

@@ -64,8 +64,6 @@ services:
internal:
command: --config "/etc/mongod.conf" --replSet rs
# TODO: S3 uploads from the servers use the first part of the path (like
# "mii") as the bucket name instead of "pn-cdn". Why?
minio:
image: minio/minio:latest
ports:

View File

@@ -5,9 +5,9 @@ set -eu
mc alias set minio http://minio:9000 "$MINIO_ROOT_USER" "$MINIO_ROOT_PASSWORD"
mc admin info minio
buckets="mii paintings screenshots"
buckets="pn-cdn"
# Create a bucket named mii and allow public access
# Create buckets allow public access
for bucket in $buckets; do
mc mb "minio/$bucket"
mc anonymous set download "minio/$bucket"

View File

@@ -2,7 +2,7 @@ server {
listen 80;
server_name cdn.pretendo.cc;
set $upstream http://minio:9000;
set $upstream http://pn-cdn.minio:9000;
location / {
limit_except GET HEAD {
deny all;

View File

@@ -1,7 +1,7 @@
{
"http": {
"port": 8080,
"base_url": "http://www.pretendo.cc"
"base_url": "https://pretendo.network"
},
"api_base": "http://api.pretendo.cc",
"database": {

View File

@@ -0,0 +1 @@
MINIO_DOMAIN=minio