Move from ./repo to ./http-root/chaotic-aur
This allows nginx to be used for other stuff too
This commit is contained in:
parent
473521d03e
commit
3de8599c96
|
@ -5,7 +5,7 @@ services:
|
|||
restart: unless-stopped
|
||||
hostname: ${DOMAIN_NAME:?err}
|
||||
volumes:
|
||||
- './repo:/var/lib/nginx/html/repo/chaotic-aur:ro'
|
||||
- './http-root:/var/lib/nginx/html/http-root:ro'
|
||||
- './data/acme-webroot:/var/lib/nginx/html/acme:ro'
|
||||
- './data/letsencrypt/etc:/etc/letsencrypt:ro'
|
||||
- './preset/nginx.conf:/etc/nginx/nginx.conf:ro'
|
||||
|
@ -22,7 +22,7 @@ services:
|
|||
- TZ=Europe/London
|
||||
volumes:
|
||||
- './data/syncthing:/config'
|
||||
- './repo:/repo'
|
||||
- './http-root/chaotic-aur:/repo'
|
||||
ports:
|
||||
- 8384:8384
|
||||
- 22000:22000/tcp
|
||||
|
@ -31,7 +31,7 @@ services:
|
|||
restart: unless-stopped
|
||||
|
||||
cloudflared:
|
||||
image: cloudflare/cloudflared:2022.2.2
|
||||
image: cloudflare/cloudflared:2022.4.1
|
||||
container_name: cloudflared
|
||||
command: tunnel run --url http://nginx ${DOMAIN_NAME:?err}
|
||||
user: root
|
||||
|
|
|
@ -5,7 +5,7 @@ services:
|
|||
restart: unless-stopped
|
||||
hostname: ${DOMAIN_NAME:?err}
|
||||
volumes:
|
||||
- './repo:/var/lib/nginx/html/repo/chaotic-aur:ro'
|
||||
- './http-root:/var/lib/nginx/html/http-root:ro'
|
||||
- './data/acme-webroot:/var/lib/nginx/html/acme:ro'
|
||||
- './data/letsencrypt/etc:/etc/letsencrypt:ro'
|
||||
- './preset/nginx.conf:/etc/nginx/nginx.conf:ro'
|
||||
|
@ -29,7 +29,7 @@ services:
|
|||
- TZ=Europe/London
|
||||
volumes:
|
||||
- './data/syncthing:/config'
|
||||
- './repo:/repo'
|
||||
- './http-root/chaotic-aur:/repo'
|
||||
ports:
|
||||
- 8384:8384
|
||||
- 22000:22000/tcp
|
||||
|
|
|
@ -4,7 +4,7 @@ server {
|
|||
autoindex_exact_size off;
|
||||
autoindex_format xml;
|
||||
|
||||
root /var/lib/nginx/html/repo;
|
||||
root /var/lib/nginx/html/http-root;
|
||||
location ~* /chaotic-aur/x86_64/(?!.*chaotic-aur\.(db|files)).+\.tar.* {
|
||||
add_header Cache-Control "max-age=150, stale-while-revalidate=150, stale-if-error=86400";
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ server {
|
|||
autoindex_exact_size off;
|
||||
autoindex_format xml;
|
||||
|
||||
root /var/lib/nginx/html/repo;
|
||||
root /var/lib/nginx/html/http-root;
|
||||
location ~* /chaotic-aur/x86_64/(?!.*chaotic-aur\.(db|files)).+\.tar.* {
|
||||
add_header Cache-Control "max-age=150, stale-while-revalidate=150, stale-if-error=86400";
|
||||
}
|
||||
|
|
13
run
13
run
|
@ -35,9 +35,16 @@ elif [ ! -e "./data/cloudflared/home/.cloudflared/cert.pem" ]; then
|
|||
docker-compose -f docker-compose-tunnels.yml run --rm cloudflared tunnel route dns $DOMAIN_NAME $DOMAIN_NAME
|
||||
fi
|
||||
|
||||
if [ ! -e ./repo ]; then
|
||||
mkdir -p ./repo/.stfolder
|
||||
chown -R 1000:1000 ./repo
|
||||
if [ ! -e ./http-root/chaotic-aur ]; then
|
||||
# Convert legacy
|
||||
if [ -d ./repo ]; then
|
||||
./stop
|
||||
mkdir ./http-root
|
||||
mv ./repo ./http-root/chaotic-aur
|
||||
else
|
||||
mkdir -p ./http-root/chaotic-aur/.stfolder
|
||||
chown -R 1000:1000 ./http-root/chaotic-aur/
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -e ./data/syncthing/config.xml ]; then
|
||||
|
|
Loading…
Reference in New Issue