Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/giyomoon/nomad
Nomad with Wireguard + Docker
https://github.com/giyomoon/nomad
Last synced: 2 days ago
JSON representation
Nomad with Wireguard + Docker
- Host: GitHub
- URL: https://github.com/giyomoon/nomad
- Owner: GiyoMoon
- Created: 2022-07-05T20:44:22.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-06T16:53:11.000Z (3 months ago)
- Last Synced: 2025-01-19T06:37:37.797Z (7 days ago)
- Language: HCL
- Size: 9.77 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Nomad with Wireguard + Docker
This installation assumes you have a clean Debian installation.## 🔼 Update system
```bash
apt update
apt upgrade
apt dist-upgrade
apt install vim
reboot
```## 🔥 Install ufw
```bash
apt install ufw
ufw allow OpenSSH
ufw enable
systemctl start ufw
```## 🔒 Install Wireguard
```bash
curl -O https://raw.githubusercontent.com/angristan/wireguard-install/master/wireguard-install.sh
chmod +x wireguard-install.sh
./wireguard-install.sh
```
After script:
```bash
ufw allow in on wg0
ufw allow {WIREGUARD_PORT}/udp
```## 🍱 Install Nomad
```bash
apt install wget gpg coreutils
wget -O- https://apt.releases.hashicorp.com/gpg | \
gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" \
| tee /etc/apt/sources.list.d/hashicorp.list
apt update && apt install nomad
```
Edit the file `/etc/nomad.d/nomad.hcl` and replace it with [this](./nomad.hcl) content.## 🐳 Install Docker
```bash
mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
apt update
apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin
ufw allow in on docker0
```## 🤖 Create a Nomad systemd service
```bash
touch /etc/systemd/system/nomad.service
```
Edit the file `/etc/systemd/system/nomad.service` and insert [this](./nomad.service) content.
```bash
systemctl enable nomad.service
systemctl start nomad.service
```Done! A sample task which contains traefik can be found [here](./traefik.hcl).