Added an arch VM accessible through ttyd
This commit is contained in:
parent
c0244643bf
commit
817c811b3a
40
Dockerfile.arch-ttyd
Normal file
40
Dockerfile.arch-ttyd
Normal file
@ -0,0 +1,40 @@
|
||||
FROM archlinux:latest
|
||||
|
||||
# Update system and install essential packages
|
||||
RUN pacman -Syu --noconfirm && \
|
||||
pacman -S --noconfirm \
|
||||
base-devel \
|
||||
git \
|
||||
wget \
|
||||
vim \
|
||||
nvim \
|
||||
nano \
|
||||
htop \
|
||||
lazygit \
|
||||
ttyd \
|
||||
sudo \
|
||||
which \
|
||||
net-tools \
|
||||
iputils \
|
||||
bind-tools \
|
||||
openssh && \
|
||||
pacman -Scc --noconfirm
|
||||
|
||||
# Create a workspace directory
|
||||
RUN mkdir -p /data
|
||||
|
||||
# Create entrypoint script
|
||||
RUN echo '#!/bin/bash' > /entrypoint.sh && \
|
||||
echo 'chmod 600 /root/.ssh/id_rsa' >> /entrypoint.sh && \
|
||||
echo 'exec ttyd -c $TTYD_USERNAME:$TTYD_PASSWORD -W -p 7681 bash' >> /entrypoint.sh && \
|
||||
chmod +x /entrypoint.sh
|
||||
|
||||
# Install Astronvim
|
||||
RUN git clone --depth 1 https://github.com/AstroNvim/template ~/.config/nvim && \
|
||||
rm -rf ~/.config/nvim/.git
|
||||
|
||||
WORKDIR /data
|
||||
|
||||
EXPOSE 7681
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
@ -3,6 +3,7 @@ include:
|
||||
- gitea.yml
|
||||
- llm.yml
|
||||
- monitoring.yml
|
||||
- vms.yml
|
||||
|
||||
services:
|
||||
traefik:
|
||||
|
28
vms.yml
Normal file
28
vms.yml
Normal file
@ -0,0 +1,28 @@
|
||||
services:
|
||||
arch-ttyd:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.arch-ttyd
|
||||
container_name: arch-ttyd
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./hdd0/vms/arch/data:/data
|
||||
- ./hdd0/vms/arch/root:/root
|
||||
- ~/.ssh/id_rsa:/root/.ssh/id_rsa:ro
|
||||
environment:
|
||||
- TTYD_USERNAME=${TTYD_USERNAME:-admin}
|
||||
- TTYD_PASSWORD=${MASTER_PASSWORD:-changeme}
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.arch.rule=Host(`arch.bouvais.lu`)"
|
||||
- "traefik.http.routers.arch.entrypoints=websecure"
|
||||
- "traefik.http.routers.arch.tls.certresolver=myresolver"
|
||||
- "traefik.http.services.arch.loadbalancer.server.port=7681"
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
Loading…
x
Reference in New Issue
Block a user