Skip to content

Commit e4b664f

Browse files
runleveldevweb-flow
andcommitted
Parameterize instance URLs for self-hosted deployments
Add support for configuring Proxmox and container creation URLs via environment variables, allowing self-hosted deployments to customize URLs without editing checked-in files. Changes: - Add .env.example with URL configuration template - Update .gitignore to exclude .env files - Add customFields to docusaurus.config.ts for URL configuration - Create useInstanceUrls hook for accessing URLs in React components - Create InstanceUrl components (ProxmoxUrl, ContainerCreationUrl) for MDX - Convert relevant .md files to .mdx to use React components - Update navbar to use environment variable for container creation URL - Update homepage to use useInstanceUrls hook - Update documentation files to use parameterized URL components - Add configuration documentation to README.md - Fix broken .md links (should be without extension) Environment variables: - PROXMOX_URL: Proxmox Web GUI URL (default: https://localhost:8006) - CONTAINER_CREATION_URL: Container creation UI URL (default: https://localhost) Co-authored-by: GitHub Copilot <noreply@github.com>
1 parent ab12fed commit e4b664f

9 files changed

Lines changed: 203 additions & 9 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Proxmox Web GUI URL
2+
# Example: https://your-proxmox-server:8006
3+
PROXMOX_URL=https://opensource.mieweb.org:8006
4+
5+
# Container Creation Web GUI URL
6+
# Example: https://create-container.your-domain.com
7+
CONTAINER_CREATION_URL=https://create-a-container.opensource.mieweb.org

mie-opensource-landing/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
# Misc
1212
.DS_Store
13+
.env
1314
.env.local
1415
.env.development.local
1516
.env.test.local

mie-opensource-landing/README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
11
# MIE Open Source Landing Page
22

3-
A modern, responsive landing page showcasing MIE's open source initiatives, built with [Docusaurus](https://docusaurus.io/). Features container management tools, Proxmox Launchpad CI/CD integration, and comprehensive documentation.
3+
A modern, responsive landing page showcasing MIE's open source initiatives, built with [Docusaurus](https://docusaurus.io/). Features container management tools, Proxmox Launchpad CI/CD integration, and comprehensive documentation.
4+
5+
## Configuration for Self-Hosted Deployments
6+
7+
This documentation site is designed to work for both MIE's hosted deployment and self-hosted instances. URLs for Proxmox and container creation services are parameterized.
8+
9+
### Environment Variables
10+
11+
Copy `.env.example` to `.env` and update the URLs for your deployment:
12+
13+
```bash
14+
cp .env.example .env
15+
```
16+
17+
Then edit `.env` with your instance URLs:
18+
19+
```env
20+
# Your Proxmox Web GUI URL
21+
PROXMOX_URL=https://your-proxmox-server:8006
22+
23+
# Your Container Creation Web GUI URL
24+
CONTAINER_CREATION_URL=https://your-container-creation-url.com
25+
```
26+
27+
These URLs will be used throughout the documentation and site interface automatically.

mie-opensource-landing/docs/creating-containers/basic-containers/command-line.md renamed to mie-opensource-landing/docs/creating-containers/basic-containers/command-line.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
sidebar_position: 2
33
---
44

5+
import { ProxmoxUrl } from '@site/src/components/InstanceUrl';
6+
57
# Using The Command Line
68

79
:::note Note
8-
This walkthrough assumes that you already have a registered proxmox account in the cluster. If not, see [Introduction](/docs/intro.md).
10+
This walkthrough assumes that you already have a registered proxmox account in the cluster. If not, see [Introduction](/docs/intro).
911
:::
1012

1113
This guide shows you how to set up a basic LXC container on the MIE Opensource Proxmox Cluster using the command line. We will walk you through several configuration steps, with exact prompts shown below.
@@ -111,7 +113,7 @@ Enter the protocol abbreviation (e.g, LDAP for Lightweight Directory Access Prot
111113
- Duplicate protocols are not allowed
112114

113115
:::note Note
114-
To see a full list of protocols supported by our cluster, see the [Protocol Master List](/docs/intro.md).
116+
To see a full list of protocols supported by our cluster, see the [Protocol Master List](/docs/intro).
115117
:::
116118

117119

@@ -128,7 +130,7 @@ Do you want to deploy your project automatically? (y/n) →
128130
- `n` - No, I'll deploy manually later
129131

130132
:::note Note
131-
If you choose to deploy automatically, see the documentation for doing so [here](/docs/intro.md).
133+
If you choose to deploy automatically, see the documentation for doing so [here](/docs/intro).
132134
:::
133135

134136
## 8. Container Creation Process
@@ -210,7 +212,7 @@ Save your SSH port number, as well as any port numbers, because you will not be
210212

211213
## 10. Viewing your Container on Proxmox
212214

213-
To see your container on the Proxmox GUI, navigate to [https://opensource.mieweb.org:8006](https://opensource.mieweb.org:8006). Once signed in, on the summary view, you should see the name of your container. If you double click on it, you will be able to access details, like the shell, metrics, and other network/filesystem information.
215+
To see your container on the Proxmox GUI, navigate to <ProxmoxUrl><ProxmoxUrl /></ProxmoxUrl>. Once signed in, on the summary view, you should see the name of your container. If you double click on it, you will be able to access details, like the shell, metrics, and other network/filesystem information.
214216

215217
![Hostname](img/proxmox-lxc.jpg)
216218

mie-opensource-landing/docs/creating-containers/basic-containers/web-gui.md renamed to mie-opensource-landing/docs/creating-containers/basic-containers/web-gui.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
sidebar_position: 1
33
---
44

5-
# Using a Web GUI
5+
import { ProxmoxUrl, ContainerCreationUrl } from '@site/src/components/InstanceUrl';
6+
7+
# Using the Web GUI
68
:::note Note
7-
This walkthrough assumes that you already have a registered proxmox account in the cluster. If not, see [Introduction](/docs/intro.md).
9+
This walkthrough assumes that you already have a registered proxmox account in the cluster. If not, see [Introduction](/docs/intro).
810
:::
911

10-
This guide shows you how to set up a basic LXC container on the MIE Opensource Proxmox Cluster using the a Web GUI. The Web GUI can be accessed at [https://create-a-container.opensource.mieweb.org](https://create-a-container.opensource.mieweb.org).
12+
This guide shows you how to set up a basic LXC container on the MIE Opensource Proxmox Cluster using the a Web GUI. The Web GUI can be accessed at <ContainerCreationUrl><ContainerCreationUrl /></ContainerCreationUrl>.
1113

1214
## 1. Authenticate Your Proxmox Account
1315

@@ -148,7 +150,7 @@ Save your SSH port number, as well as any port numbers, because you will not be
148150

149151
## 8. Viewing your Container on Proxmox
150152

151-
To see your container on the Proxmox GUI, navigate to [https://opensource.mieweb.org:8006](https://opensource.mieweb.org:8006). Once signed in, on the summary view, you should see the name of your container. If you double click on it, you will be able to access details, like the shell, metrics, and other network/filesystem information.
153+
To see your container on the Proxmox GUI, navigate to <ProxmoxUrl><ProxmoxUrl /></ProxmoxUrl>. Once signed in, on the summary view, you should see the name of your container. If you double click on it, you will be able to access details, like the shell, metrics, and other network/filesystem information.
152154

153155
![Hostname](img/proxmox-lxc.jpg)
154156

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
import { ProxmoxUrl } from '@site/src/components/InstanceUrl';
6+
7+
# Welcome to MIE Opensource Proxmox Cluster
8+
9+
Welcome to the documentation for the **Opensource Proxmox Cluster** at MIE (Medical Informatics Engineering). This platform provides developers and researchers with access to virtualized infrastructure for building, testing, and deploying applications in a collaborative opensource environment.
10+
11+
## 🚀 Quick Start
12+
13+
To begin using the MIE Opensource Proxmox Cluster, you'll need:
14+
15+
### Prerequisites
16+
17+
- **Valid Proxmox Account**: You must have an active PVE account at <ProxmoxUrl><ProxmoxUrl /></ProxmoxUrl>
18+
- Basic understanding of virtualization concepts
19+
- SSH client for remote access to containers
20+
21+
:::tip Access Required
22+
If you don't have an account yet, please contact the MIE team to request access to the opensource Proxmox cluster.
23+
:::
24+
25+
:::important Important
26+
When logging into <ProxmoxUrl><ProxmoxUrl /></ProxmoxUrl>, make sure you are logging in with the PVE Realm.
27+
:::
28+
29+
## What You Can Do
30+
31+
Our documentation covers everything you need to work with the cluster:
32+
33+
### New to Proxmox?
34+
**[Introduction to Proxmox →](/docs/proxmox-introduction)**
35+
36+
Learn the fundamentals of Proxmox Virtual Environment (VE), understand the interface, and discover how virtualization works in our cluster environment.
37+
38+
### Ready to Build?
39+
**[Create Your First Container →](/docs/creating-containers/basic-containers/command-line)**
40+
41+
Step-by-step guide to creating and configuring your own Linux container (LXC) from scratch. Perfect for hosting applications, development environments, or testing new software.
42+
43+
### Want to Deploy Applications Automatically?
44+
**[Advanced Container Deployment →](/docs/creating-containers/advanced-containers/deploying-containers-overview)**
45+
46+
Learn how to automatically deploy your applications during container creation, with support for single and multi-component applications.
47+
48+
### Automate Your Deployments with GitHub
49+
**[Proxmox Launchpad Integration →](/docs/proxmox-launchpad/what-is-proxmox-launchpad)**
50+
51+
Connect your GitHub repositories to automatically deploy your projects to the cluster using our custom GitHub Actions workflow. Set up CI/CD pipelines that build and deploy directly to your Proxmox containers.
52+
53+
### Develop with VSCode
54+
**[VSCode Remote Development →](/docs/vscode-setup)**
55+
56+
Connect VSCode directly to your containers for seamless remote development with full IDE capabilities.
57+
58+
## Key Features
59+
60+
- **Free Opensource Infrastructure**: Access to enterprise-grade virtualization at no cost
61+
- **Flexible Container Support**: Run both lightweight and resource-intensive containers (LXC)
62+
- **Automated Deployments**: Integrate with GitHub Actions for seamless CI/CD
63+
- **Collaborative Environment**: Share resources and collaborate with other developers
64+
- **Scalable Resources**: CPU, memory, and storage will be allocated based on your project needs
65+
66+
## Getting Access
67+
68+
1. **Login to Proxmox**: Navigate to <ProxmoxUrl><ProxmoxUrl /></ProxmoxUrl>
69+
2. **Use your credentials**: Login with your provided username and password and **select the PVE Realm**.
70+
3. **Explore the interface**: Familiarize yourself with the Proxmox web interface
71+
4. **Start building**: Create your first container
72+
73+
## Documentation Structure
74+
75+
This documentation is organized into several sections:
76+
77+
- **Introduction to Proxmox**: Learn the fundamentals of Proxmox and how our cluster works
78+
- **Creating Containers**: Essential guides for creating basic and advanced containers
79+
- **Proxmox Launchpad**: GitHub Actions integration for automated deployments
80+
- **Monitoring & Development**: Tools for managing and developing in your containers
81+
82+
## Need Help?
83+
84+
- Review the [Protocol List](/docs/creating-containers/protocol-list) for supported network protocols
85+
- Check the troubleshooting sections in each guide for common issues
86+
- Contact the MIE team for account or access-related questions
87+
88+
---
89+
90+
Ready to get started? Choose your path above and begin building on the MIE Opensource Proxmox Cluster!
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
sidebar_position: 5
3+
---
4+
5+
import { ProxmoxUrl } from '@site/src/components/InstanceUrl';
6+
7+
# Monitoring Container in Proxmox Web GUI
8+
9+
Once you have created a container, whether through the Web GUI, command line, or Proxmox Launchpad, you can monitor the container's performance using the Proxmox Web GUI located at <ProxmoxUrl><ProxmoxUrl /></ProxmoxUrl>.
10+
11+
## Container Dashboard
12+
13+
Upon logging in, you can see a dashboard with all of your active containers:
14+
15+
![Proxmox Container Dashboard](./img/proxmox-container-dashboard.png)
16+
17+
> In this screenshot, I have one active container called test-project with a CTID of 115.
18+
19+
Each container ID has a tag of the OS and your username.
20+
21+
## Accessing Container Metrics
22+
23+
Double click on the container that you want to manage.
24+
25+
![Container Metrics](./img/container-metrics.png)
26+
27+
The container dashboard allows you to view the CPU usage, the Memory usage, the SWAP usage, and the SSD of your container. At the top, there are progress bars which show your usage compared to the amount of resource you have allocated.
28+
29+
Proxmox also provides graphs that show your container's usage of a certain metric oer a period of time (usually an hour by default).
30+
31+
![Container Charts](./img/container-charts.png)
32+
33+
:::important Important
34+
It is very important to monitor you container metrics at regular intervals, especially if your container is slow (ie, packages not installing quickly/hanging, etc.). If your application is constantly using 80% or more of a metric, reach out to an MIE cluster admin and we can upgrade that resource for your container.
35+
:::
36+
37+
## Accessing Container Shell
38+
39+
You can also access your container's shell right from Proxmox.
40+
41+
![Proxmox Container Shell](./img/proxmox_shell.png)
42+
43+
:::note Only use Proxmox Shell when Necessary
44+
It is recommended to modify your container using a terminal on your local machine on a regular basis.
45+
:::
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import React from 'react';
2+
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
3+
4+
export const ProxmoxUrl = ({ children }: { children?: React.ReactNode }) => {
5+
const { siteConfig } = useDocusaurusContext();
6+
const url = siteConfig.customFields.proxmoxUrl as string;
7+
return children ? <a href={url}>{children}</a> : <>{url}</>;
8+
};
9+
10+
export const ContainerCreationUrl = ({ children }: { children?: React.ReactNode }) => {
11+
const { siteConfig } = useDocusaurusContext();
12+
const url = siteConfig.customFields.containerCreationUrl as string;
13+
return children ? <a href={url}>{children}</a> : <>{url}</>;
14+
};
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
2+
3+
export const useInstanceUrls = () => {
4+
const { siteConfig } = useDocusaurusContext();
5+
return {
6+
proxmoxUrl: siteConfig.customFields.proxmoxUrl as string,
7+
containerCreationUrl: siteConfig.customFields.containerCreationUrl as string,
8+
};
9+
};

0 commit comments

Comments
 (0)