Constantin.FF
Dabbler
- Joined
- Apr 6, 2022
- Messages
- 13
This is guide on how I set up my Scale to build and run custom projects.
I use it to run Nodejs, PHP and some linux bash scripts and GUI apps with noVNC.
This is an alternative of using Github and Github Actions for the build and DockerHub for you images.
Prerequisites:
Step 1: Install Gitea
Before installing Gitea, make sure you have these apps installed:
Install Gitea with the recommended settings.
Step 2: Installing Portainer
The default Portainer install only provides access to the Kubernetes cluster. To gain access to Docker as well, follow these steps:
Step 3: Adding Docker Sock in Portainer
Step 4: Testing Your Setup
Final Steps: Accessing Your App
With everything set up, Portainer should now clone your code and run Docker Compose. If you've exposed ports in your
To-Do List:
Troubleshooting:
I use it to run Nodejs, PHP and some linux bash scripts and GUI apps with noVNC.
This is an alternative of using Github and Github Actions for the build and DockerHub for you images.
Prerequisites:
- Ensure you have the TrueCharts apps catalog set up. If not, follow this guide:
Getting Started with TrueCharts | TrueCharts
Below you'll find recommended steps to go from a blank or fresh TrueNAS SCALE installation to using TrueCharts with the best possible experience and performance as determined by the TrueCharts team. It does not replace the application specific guides and/or specific guides on certain subjects...truecharts.org
- (Optional) If you plan to use your own domain for your apps (e.g., "portainer.example.com", "git.example.com")
Installcert-manager
andclusterissuer
clusterissuer Setup Guide
truecharts.org
TrueNAS Web GUI via Traefik | TrueCharts
If you followed the instructions in Installing Traefik, your TrueNAS Web GUI will now be served on custom ports (port 81 and 444 in the video guide).truecharts.org
Step 1: Install Gitea
Before installing Gitea, make sure you have these apps installed:
cloudnative-pg
and prometheus-operator
.Install Gitea with the recommended settings.
Step 2: Installing Portainer
The default Portainer install only provides access to the Kubernetes cluster. To gain access to Docker as well, follow these steps:
- Mount the docker.sock into the container to access Docker directly:
Code:[Additional App Storage] Type of Storage: Host Path Host Path: /var/run/docker.sock Mount Path: /var/run/docker.sock
- Change "runAsGroup" to get access to docker
Code:[Security Context] runAsGroup: 999 (the "docker" group on SCALE).
- For proper project cloning and running in Portainer some additional settings are required.
The actual discussion for this issue is here: https://github.com/orgs/portainer/discussions/9795
Ensure these three paths settings are the same.
Code:[Extra Args] --data=/mnt/pool-1/portainer/data [Additional App Storage] Type of Storage: Host Path Host Path: /mnt/pool-1/portainer/data Mount Path: /mnt/pool-1/portainer/data
Step 3: Adding Docker Sock in Portainer
- Log into the Portainer instance.
- Upon the first run, you'll be prompted to add the "local" Kubernetes cluster. Proceed with it.
- Navigate to
Environments
->+ Add Environment
- Choose
Docker Standalone
and selectStart Wizard
- Select
Socket
, then provide a name for the environment.
Step 4: Testing Your Setup
- From the Home screen, select your Docker environment.
- Access Stacks and click
+ Add Stack
- Choose
Repository
if you want code pulled from Gitea or GitHub. - Configure other settings based on your project's requirements.
Final Steps: Accessing Your App
With everything set up, Portainer should now clone your code and run Docker Compose. If you've exposed ports in your
docker-compose.yml
file, you can access your app using your TrueNAS IP together with your app exposed port.To-Do List:
- Explore the possibility of building Docker containers in Portainer and using them in SCALE Apps, either through "Launch Docker Image" or TrueCharts "custom-app".
- Include screenshots
Troubleshooting:
- If you encounter issues while running Gitea with CloudNative-PG (CNPG), refer to this useful link.
https://truecharts.org/manual/FAQ#how-do-i-stop-a-truecharts-app-truenas-scale-only