Compare commits

..

2 Commits

Author SHA1 Message Date
MSWS
5130ba10a1 build: Configure dev tools and add VPN setup instructions
- Add commented-out `gluetun` service configuration in `navidrome/compose.yml` with detailed setup instructions and references to external documentation.
- Update `code-server/Dockerfile` by removing unstable Neovim PPA, adding `cargo` installation, configuring PATH for Cargo binaries, and installing `gptcommit`.
- Add new Git aliases (`ca` and `c`), update `.config` copy process, and revise VSCode extension installation script.

[navidrome/compose.yml]
- Added a commented-out service configuration for `gluetun`.
  - The configuration includes setup instructions, such as enabling external container connection, assigning permissions, and specifying required devices and ports.
  - Environment variables for VPN setup (OpenVPN/Wireguard), timezone, and server updater are included.
  - Provides references to external documentation for further details.
[code-server/Dockerfile]
- Removed addition of the unstable Neovim PPA repository.
- Added `cargo` package installation to the dependency list.
- Configured the `PATH` environment variable to include Cargo's binary directory.
- Installed the `gptcommit` tool using Cargo.
- Added new Git aliases for quicker commit commands (`ca` and `c`).
- Added configuration to copy `.config` directory during the build process.
- Updated the location of the VSCode extension installation command to use a more generic `/usr/local/bin/install-extension` script, and commented out the related installation block, possibly for future updates or changes to extension installation logic.
2025-03-28 17:19:48 -07:00
MSWS
7d07a1e700 docs: Update Caddyfile to refine redirects and clarify behavior
Update Caddyfile configurations for `*.code.msws.xyz` and clarify existing logic

- Modify `*.code.msws.xyz` configuration:
  - Comment out the previous `reverse_proxy` setup.
  - Add `auto_https disable_redirects` (commented-out for reference).
  - Introduce a new `handle_path` block to redirect requests to `https://code.msws.xyz/proxy/...` with a 302 status.
- Clarify port `:443` and `:80` logic:
  - Document redirection for `/resume` to a GitHub-hosted PDF resource.
  - Make existing `/s` and reverse proxy configurations to `https://msws.github.io` more explicit.

[caddy/Caddyfile]
Summary:

- Updated the configuration for `*.code.msws.xyz`:
  - Commented out the previous `reverse_proxy` configuration.
  - Added a new configuration that disables HTTPS redirects via `auto_https disable_redirects` (commented-out block).
  - Introduced a new `handle_path` block to redirect requests to a specific URL structure (`https://code.msws.xyz/proxy/...`) with a 302 status.

- No changes made to the reverse proxy configurations for other subdomains (e.g., `yt`, `music`, `watch`, `photos`).

- Expanded the logic for port `:443` and `:80`:
  - Added a comment to clarify the redirection for `/resume` to a PDF resource hosted on GitHub.
  - Made existing configurations for `/s` and reverse proxy behavior to `https://msws.github.io` more explicit.
2025-03-28 15:01:05 -07:00
3 changed files with 58 additions and 16 deletions

View File

@@ -36,14 +36,14 @@ git.msws.xyz {
reverse_proxy gitea-server-1:3000
}
*.code.msws.xyz {
reverse_proxy code-server:8443
}
yt.local.msws.xyz, yt.msws.xyz {
reverse_proxy invidious:3000
}
#*.code.msws.xyz {
# auto_https disable_redirects
#}
music.local.msws.xyz, music.msws.xyz {
reverse_proxy navidrome:4533
}
@@ -56,6 +56,12 @@ photos.local.msws.xyz, photos.msws.xyz {
reverse_proxy immich_server:2283
}
*.code.msws.xyz {
handle_path /* {
redir https://code.msws.xyz/proxy/{labels.3}{path}?{query} 302
}
}
:443, :80 {
handle_path /resume* {
rewrite * /MSWS/Resume/main/Resume.pdf

View File

@@ -10,11 +10,13 @@ SHELL ["/bin/bash", "-c"]
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:git-core/ppa && \
add-apt-repository ppa:neovim-ppa/unstable && \
apt-get update && \
apt-get install -y texlive-full curl wget git zoxide && \
apt-get install -y texlive-full curl wget git zoxide cargo && \
rm -rf /var/lib/apt/lists/*
ENV PATH="$PATH:/config/.cargo/bin"
RUN cargo install --locked gptcommit
# Set global git config
RUN git config --global user.name MSWS && \
git config --global user.email imodmaker@gmail.com && \
@@ -22,7 +24,9 @@ RUN git config --global user.name MSWS && \
git config --global push.autoSetupRemote true && \
git config --global user.signingKey ~/.ssh/github && \
git config --global commit.gpgsign true && \
git config --global gpg.format ssh
git config --global gpg.format ssh && \
git config --global alias.ca "commit -ca" && \
git config --global alias.c "commit -a"
RUN git clone https://github.com/MSWS/nvim-config.git /config/.config/nvim
@@ -30,17 +34,18 @@ RUN git clone https://github.com/MSWS/nvim-config.git /config/.config/nvim
RUN mkdir -p /config/.ssh/ && chmod 0700 /config/.ssh/
COPY --chown=abc:abc .ssh /config/.ssh
COPY --chown=abc:abc .config /config/.config
COPY extensions /extensions
RUN echo "eval \"\$(zoxide init bash)\"" >> /config/.bashrc
# Install VSCode extensions
RUN /app/code-server/lib/vscode/bin/remote-cli/code-server --install-extension James-Yu.latex-workshop && \
/app/code-server/lib/vscode/bin/remote-cli/code-server --install-extension WakaTime.vscode-wakatime && \
/app/code-server/lib/vscode/bin/remote-cli/code-server --install-extension ms-python.python && \
/app/code-server/lib/vscode/bin/remote-cli/code-server --install-extension ms-vscode.live-server && \
/app/code-server/lib/vscode/bin/remote-cli/code-server --install-extension vscodevim.vim && \
/app/code-server/lib/vscode/bin/remote-cli/code-server --install-extension asvetliakov.vscode-neovim && \
for file in ./extensions/*.vsix; do \
/app/code-server/lib/vscode/bin/remote-cli/code-server --install-extension $file; \
done
# RUN /usr/local/bin/install-extension James-Yu.latex-workshop && \
# /usr/local/bin/install-extension WakaTime.vscode-wakatime && \
# /usr/local/bin/install-extension ms-python.python && \
# /usr/local/bin/install-extension ms-vscode.live-server && \
# /usr/local/bin/install-extension vscodevim.vim && \
# /usr/local/bin/install-extension asvetliakov.vscode-neovim && \
# for file in ./extensions/*.vsix; do \
# /usr/local/bin/install-extension $file; \
# done

View File

@@ -93,6 +93,37 @@ services:
- tor
- cloudflared
# gluetun:
# image: qmcgaw/gluetun
# # container_name: gluetun
# # line above must be uncommented to allow external containers to connect.
# # See https://github.com/qdm12/gluetun-wiki/blob/main/setup/connect-a-container-to-gluetun.md#external-container-to-gluetun
# cap_add:
# - NET_ADMIN
# devices:
# - /dev/net/tun:/dev/net/tun
# ports:
# - 8888:8888/tcp # HTTP proxy
# - 8388:8388/tcp # Shadowsocks
# - 8388:8388/udp # Shadowsocks
# volumes:
# - gluetun-data:/gluetun
# environment:
# # See https://github.com/qdm12/gluetun-wiki/tree/main/setup#setup
# - VPN_SERVICE_PROVIDER=ivpn
# - VPN_TYPE=openvpn
# # OpenVPN:
# - OPENVPN_USER=
# - OPENVPN_PASSWORD=
# # Wireguard:
# # - WIREGUARD_PRIVATE_KEY=wOEI9rqqbDwnN8/Bpp22sVz48T71vJ4fYmFWujulwUU=
# # - WIREGUARD_ADDRESSES=10.64.222.21/32
# # Timezone for accurate log times
# - TZ=Etc/UTC
# # Server list updater
# # See https://github.com/qdm12/gluetun-wiki/blob/main/setup/servers.md#update-the-vpn-servers-list
# - UPDATER_PERIOD=24h
networks:
cloudflared:
external: true