Use own code-server image and split mongodb into separate container
All checks were successful
ShellCheck / shellcheck (push) Successful in 21s
All checks were successful
ShellCheck / shellcheck (push) Successful in 21s
This commit is contained in:
parent
9f8699d20d
commit
ca0eea27b5
10 changed files with 35 additions and 13 deletions
|
@ -1,7 +1,7 @@
|
||||||
FROM node:20-alpine
|
FROM node:20-alpine
|
||||||
RUN apk upgrade
|
RUN apk upgrade
|
||||||
ENV NEXT_TELEMETRY_DISABLED 1
|
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
|
RUN mv big-AGI-* big-AGI
|
||||||
WORKDIR /big-AGI
|
WORKDIR /big-AGI
|
||||||
RUN mv middleware_BASIC_AUTH.ts middleware.ts
|
RUN mv middleware_BASIC_AUTH.ts middleware.ts
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
FROM ghcr.io/coder/code-server:fedora
|
FROM quay.io/fedora/fedora-toolbox:40
|
||||||
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
|
|
||||||
RUN dnf up -y
|
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 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 authselect select minimal
|
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 /etc/systemd/system/user@.service.d
|
||||||
RUN mkdir /var/lib/systemd/linger
|
RUN mkdir /var/lib/systemd/linger
|
||||||
RUN touch /var/lib/systemd/linger/coder
|
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 override.conf /etc/systemd/system/user@.service.d
|
||||||
COPY code-server.service /etc/systemd/user
|
COPY code-server.service /etc/systemd/user
|
||||||
ENTRYPOINT /sbin/init
|
ENTRYPOINT /sbin/init
|
||||||
|
|
|
@ -5,6 +5,7 @@ UserNS=keep-id:uid=1000,gid=1000
|
||||||
User=0
|
User=0
|
||||||
Network=host
|
Network=host
|
||||||
AddDevice=/dev/dri
|
AddDevice=/dev/dri
|
||||||
|
AddDevice=/dev/kvm
|
||||||
Volume=%h/sandbox:/home/mathieu
|
Volume=%h/sandbox:/home/mathieu
|
||||||
Volume=%t/wayland-0:/tmp/wayland-0
|
Volume=%t/wayland-0:/tmp/wayland-0
|
||||||
AutoUpdate=registry
|
AutoUpdate=registry
|
||||||
|
|
8
home/etc/containers/systemd/mongodb.container
Normal file
8
home/etc/containers/systemd/mongodb.container
Normal 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
|
3
home/etc/containers/systemd/mongodb.network
Normal file
3
home/etc/containers/systemd/mongodb.network
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[Network]
|
||||||
|
IPv6=true
|
||||||
|
Options=isolate=true
|
0
home/etc/containers/systemd/mongodb.volume
Normal file
0
home/etc/containers/systemd/mongodb.volume
Normal file
|
@ -1,9 +1,18 @@
|
||||||
|
[Unit]
|
||||||
|
Requires=mongodb.service
|
||||||
|
After=mongodb.service
|
||||||
[Container]
|
[Container]
|
||||||
Image=docker.io/jacobalberty/unifi
|
Image=docker.io/goofball222/unifi
|
||||||
|
Network=mongodb.network
|
||||||
Network=nginx.network
|
Network=nginx.network
|
||||||
HealthCmd=none
|
HealthCmd=none
|
||||||
Volume=unifi.volume:/unifi/data:U,Z
|
Volume=unifi.volume:/usr/lib/unifi/data:U,Z
|
||||||
Tmpfs=/unifi/run
|
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
|
||||||
PublishPort=[::]:8080:8080
|
PublishPort=[::]:8080:8080
|
||||||
AutoUpdate=registry
|
AutoUpdate=registry
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
cp -R home/* /
|
cp -R home/* /
|
||||||
ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
|
|
||||||
sh setup-server.sh
|
sh setup-server.sh
|
||||||
systemd-tmpfiles --create
|
systemd-tmpfiles --create
|
||||||
|
|
|
@ -3,7 +3,6 @@ set -e
|
||||||
cp -R desktop/* laptop/* /
|
cp -R desktop/* laptop/* /
|
||||||
sh setup-desktop.sh
|
sh setup-desktop.sh
|
||||||
systemctl disable auditd
|
systemctl disable auditd
|
||||||
systemctl enable --now sshd
|
|
||||||
systemctl mask --global grub-boot-success.timer
|
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 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
|
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
|
||||||
|
|
|
@ -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 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 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 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 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 option name-server 192.168.253.1
|
||||||
set service dhcp-server shared-network-name server subnet 192.168.253.0/24 subnet-id 3
|
set service dhcp-server shared-network-name server subnet 192.168.253.0/24 subnet-id 3
|
||||||
|
|
Loading…
Add table
Reference in a new issue