Use own code-server image and split mongodb into separate container
All checks were successful
ShellCheck / shellcheck (push) Successful in 21s

This commit is contained in:
Mathieu Strypsteen 2024-05-10 15:45:38 +02:00
parent 9f8699d20d
commit ca0eea27b5
Signed by: mathieu
GPG key ID: 782A42E461BC6824
10 changed files with 35 additions and 13 deletions

View file

@ -1,7 +1,7 @@
FROM node:20-alpine
RUN apk upgrade
ENV NEXT_TELEMETRY_DISABLED 1
RUN wget -O - https://github.com/enricoros/big-AGI/archive/refs/tags/v1.15.1.tar.gz | tar xz
RUN wget -O - https://github.com/enricoros/big-AGI/archive/refs/tags/v1.16.0.tar.gz | tar xz
RUN mv big-AGI-* big-AGI
WORKDIR /big-AGI
RUN mv middleware_BASIC_AUTH.ts middleware.ts

View file

@ -1,14 +1,16 @@
FROM ghcr.io/coder/code-server:fedora
RUN mkdir -p /home/coder/.config/systemd/user/default.target.wants
RUN ln -s /etc/systemd/user/code-server.service /home/coder/.config/systemd/user/default.target.wants
USER root
RUN sed /^tsflags/d -i /etc/dnf/dnf.conf
FROM quay.io/fedora/fedora-toolbox:40
RUN dnf up -y
RUN dnf install -y bash-color-prompt bash-completion cargo hostname hyperfine man-db man-pages nodejs-npm poetry postgresql-server python-unversioned-command rustfmt rust-src systemd-container vim-enhanced
RUN authselect select minimal
RUN dnf install -y bash-color-prompt cargo hyperfine nodejs-npm poetry postgresql-server python3-ipykernel python3-pip rustfmt rust-src systemd-container vim-enhanced
RUN dnf install -y https://github.com/coder/code-server/releases/download/v4.89.0/code-server-4.89.0-amd64.rpm
RUN mkdir /etc/systemd/system/user@.service.d
RUN mkdir /var/lib/systemd/linger
RUN touch /var/lib/systemd/linger/coder
RUN useradd coder
RUN echo "coder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
USER coder
RUN mkdir -p /home/coder/.config/systemd/user/default.target.wants
RUN ln -s /etc/systemd/user/code-server.service /home/coder/.config/systemd/user/default.target.wants
USER root
COPY override.conf /etc/systemd/system/user@.service.d
COPY code-server.service /etc/systemd/user
ENTRYPOINT /sbin/init

View file

@ -5,6 +5,7 @@ UserNS=keep-id:uid=1000,gid=1000
User=0
Network=host
AddDevice=/dev/dri
AddDevice=/dev/kvm
Volume=%h/sandbox:/home/mathieu
Volume=%t/wayland-0:/tmp/wayland-0
AutoUpdate=registry

View file

@ -0,0 +1,8 @@
[Container]
Image=docker.io/mongo:7.0
UserNS=host
Network=mongodb.network
Volume=mongodb.volume:/data/db:Z
AutoUpdate=registry
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,3 @@
[Network]
IPv6=true
Options=isolate=true

View file

@ -1,9 +1,18 @@
[Unit]
Requires=mongodb.service
After=mongodb.service
[Container]
Image=docker.io/jacobalberty/unifi
Image=docker.io/goofball222/unifi
Network=mongodb.network
Network=nginx.network
HealthCmd=none
Volume=unifi.volume:/unifi/data:U,Z
Tmpfs=/unifi/run
Volume=unifi.volume:/usr/lib/unifi/data:U,Z
Tmpfs=/usr/lib/unifi
Tmpfs=/usr/lib/unifi/cert
Tmpfs=/usr/lib/unifi/logs
Environment=DB_MONGO_LOCAL=false
Environment=DB_MONGO_URI=mongodb://systemd-mongodb/unifi
Environment=STATDB_MONGO_URI=mongodb://systemd-mongodb/unifi_stat
PublishPort=8080:8080
PublishPort=[::]:8080:8080
AutoUpdate=registry

View file

@ -1,6 +1,5 @@
#!/bin/sh
set -e
cp -R home/* /
ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
sh setup-server.sh
systemd-tmpfiles --create

View file

@ -3,7 +3,6 @@ set -e
cp -R desktop/* laptop/* /
sh setup-desktop.sh
systemctl disable auditd
systemctl enable --now sshd
systemctl mask --global grub-boot-success.timer
flatpak remote-add --if-not-exists flathub /usr/lib/fedora-third-party/conf.d/fedora-flathub.flatpakrepo
flatpak install com.github.tchx84.Flatseal com.github.wwmm.easyeffects com.github.xournalpp.xournalpp com.moonlight_stream.Moonlight com.yubico.yubioath io.mpv.Mpv org.chromium.Chromium org.gimp.GIMP org.gnome.Boxes org.gnome.Calculator org.gnome.Evince org.gnome.Evolution org.gnome.FileRoller org.gnome.Snapshot org.gnome.TextEditor org.libreoffice.LibreOffice org.mozilla.firefox org.torproject.torbrowser-launcher

View file

@ -24,6 +24,7 @@ set service dhcp-server shared-network-name lan option name-server 192.168.254.1
set service dhcp-server shared-network-name lan subnet 192.168.254.0/24 subnet-id 2
set service dhcp-server shared-network-name lan subnet 192.168.254.0/24 range 0 start 192.168.254.2
set service dhcp-server shared-network-name lan subnet 192.168.254.0/24 range 0 stop 192.168.254.254
set service dhcp-server shared-network-name lan subnet 192.168.254.0/24 lease 3600
set service dhcp-server shared-network-name server option default-router 192.168.253.1
set service dhcp-server shared-network-name server option name-server 192.168.253.1
set service dhcp-server shared-network-name server subnet 192.168.253.0/24 subnet-id 3