mirror of
https://github.com/dragonlock2/matthewtran.com.git
synced 2025-10-11 12:07:56 +00:00
update volume creation
This commit is contained in:
parent
b714e2895b
commit
2107249f47
20
README.md
20
README.md
@ -8,7 +8,7 @@ Stuff that's deployed on [matthewtran.com](http://matthewtran.com). Tested on Ub
|
||||
- p2pool (`xmrig -o matthewtran.com:3333`)
|
||||
- minecraft
|
||||
- minecraft bedrock
|
||||
- ~~terraria~~
|
||||
- terraria
|
||||
- wireguard
|
||||
|
||||
## setup
|
||||
@ -44,14 +44,22 @@ docker compose build
|
||||
docker compose up -d # auto restarts on reboot!
|
||||
```
|
||||
|
||||
Note for first start you'll need to configure Gitea. You may also need to `chown` and `chmod` the mounted folders for each container.
|
||||
Note for first start you'll need to configure Gitea.
|
||||
|
||||
## backup
|
||||
|
||||
Run `./backup` and save the resultant `data.zip` somewhere. I should probably automate this.
|
||||
Run `./backup.sh` and save the resultant `data.zip` somewhere. I should probably automate this.
|
||||
|
||||
## TODO
|
||||
|
||||
- full setup script
|
||||
- correct volume mounting w/o need `chown`/`chmod`
|
||||
- better backup and restore
|
||||
- better setup
|
||||
- install ubuntu
|
||||
- forward ports
|
||||
- enable ssh
|
||||
- install wireguard
|
||||
- run script to setup wireguard
|
||||
- install docker + compose
|
||||
- run `volumes.sh` => container user has same uid/gid, can access
|
||||
- run docker compose
|
||||
- ufw?
|
||||
- need to setup gitea
|
||||
|
36
compose.yml
36
compose.yml
@ -31,7 +31,7 @@ services:
|
||||
monerod:
|
||||
restart: always
|
||||
build: monerod/.
|
||||
entrypoint: ["/bin/sh", "/home/matt/entry.sh"]
|
||||
entrypoint: ["/bin/sh", "/home/ubuntu/entry.sh"]
|
||||
stdin_open: true
|
||||
tty: true
|
||||
ports:
|
||||
@ -39,11 +39,11 @@ services:
|
||||
networks:
|
||||
- default6
|
||||
volumes:
|
||||
- ./monerod/.bitmonero:/home/matt/.bitmonero
|
||||
- ./monerod/.bitmonero:/home/ubuntu/.bitmonero
|
||||
p2pool:
|
||||
restart: always
|
||||
build: p2pool/.
|
||||
entrypoint: ["/bin/sh", "/home/matt/entry.sh"]
|
||||
entrypoint: ["/bin/sh", "/home/ubuntu/entry.sh"]
|
||||
stdin_open: true
|
||||
tty: true
|
||||
ports:
|
||||
@ -53,36 +53,36 @@ services:
|
||||
networks:
|
||||
- default6
|
||||
volumes:
|
||||
- ./p2pool/cache:/home/matt/cache
|
||||
- ./p2pool/cache:/home/ubuntu/cache
|
||||
- /dev/hugepages:/dev/hugepages
|
||||
minecraft:
|
||||
restart: always
|
||||
build: minecraft/.
|
||||
entrypoint: ["/bin/sh", "/home/matt/entry.sh"]
|
||||
entrypoint: ["/bin/sh", "/home/ubuntu/entry.sh"]
|
||||
ports:
|
||||
- "25565:25565"
|
||||
networks:
|
||||
- default6
|
||||
volumes:
|
||||
- ./minecraft/world:/home/matt/world
|
||||
- ./minecraft/world:/home/ubuntu/world
|
||||
minecraft_bedrock:
|
||||
restart: always
|
||||
build: minecraft_bedrock/.
|
||||
entrypoint: ["/bin/sh", "/home/matt/entry.sh"]
|
||||
entrypoint: ["/bin/sh", "/home/ubuntu/entry.sh"]
|
||||
ports:
|
||||
- "19132:19132/udp"
|
||||
- "19133:19133/udp"
|
||||
networks:
|
||||
- default6
|
||||
volumes:
|
||||
- ./minecraft_bedrock/worlds:/home/matt/worlds
|
||||
# terraria:
|
||||
# restart: always
|
||||
# build: terraria/.
|
||||
# entrypoint: ["/bin/sh", "/home/matt/entry.sh"]
|
||||
# ports:
|
||||
# - "7777:7777"
|
||||
# networks:
|
||||
# - default6
|
||||
# volumes:
|
||||
# - ./terraria/worlds:/home/matt/worlds
|
||||
- ./minecraft_bedrock/worlds:/home/ubuntu/worlds
|
||||
terraria:
|
||||
restart: always
|
||||
build: terraria/.
|
||||
entrypoint: ["/bin/sh", "/home/ubuntu/entry.sh"]
|
||||
ports:
|
||||
- "7777:7777"
|
||||
networks:
|
||||
- default6
|
||||
volumes:
|
||||
- ./terraria/worlds:/home/ubuntu/worlds
|
||||
|
@ -3,9 +3,8 @@ FROM ubuntu:24.04
|
||||
RUN apt-get update && apt-get -y upgrade
|
||||
RUN apt-get install -y wget openjdk-21-jre
|
||||
|
||||
RUN useradd -m matt
|
||||
USER matt
|
||||
WORKDIR /home/matt
|
||||
USER ubuntu
|
||||
WORKDIR /home/ubuntu
|
||||
|
||||
RUN wget https://github.com/Tiiffi/mcrcon/releases/download/v0.7.2/mcrcon-0.7.2-linux-x86-64.tar.gz
|
||||
RUN tar xvf mcrcon-0.7.2-linux-x86-64.tar.gz
|
||||
@ -13,7 +12,7 @@ RUN tar xvf mcrcon-0.7.2-linux-x86-64.tar.gz
|
||||
# from https://www.minecraft.net/en-us/download/server (currently 1.21)
|
||||
RUN wget https://piston-data.mojang.com/v1/objects/59353fb40c36d304f2035d51e7d6e6baa98dc05c/server.jar
|
||||
|
||||
COPY --chown=matt:matt eula.txt ./
|
||||
COPY --chown=matt:matt entry.sh ./
|
||||
COPY --chown=matt:matt server.properties ./
|
||||
COPY --chown=matt:matt ops.json ./
|
||||
COPY --chown=ubuntu:ubuntu eula.txt ./
|
||||
COPY --chown=ubuntu:ubuntu entry.sh ./
|
||||
COPY --chown=ubuntu:ubuntu server.properties ./
|
||||
COPY --chown=ubuntu:ubuntu ops.json ./
|
||||
|
@ -1,4 +1,3 @@
|
||||
#Minecraft server properties
|
||||
allow-flight=false
|
||||
allow-nether=true
|
||||
broadcast-console-to-ops=true
|
||||
|
@ -3,14 +3,13 @@ FROM ubuntu:24.04
|
||||
RUN apt-get update && apt-get -y upgrade
|
||||
RUN apt-get install -y wget unzip curl
|
||||
|
||||
RUN useradd -m matt
|
||||
USER matt
|
||||
WORKDIR /home/matt
|
||||
USER ubuntu
|
||||
WORKDIR /home/ubuntu
|
||||
|
||||
# from https://www.minecraft.net/en-us/download/server/bedrock (currently 1.21.23.01)
|
||||
RUN wget -O server.zip https://minecraft.azureedge.net/bin-linux/bedrock-server-1.21.23.01.zip
|
||||
RUN unzip server.zip && rm server.zip
|
||||
|
||||
COPY --chown=matt:matt entry.sh ./
|
||||
COPY --chown=matt:matt server.properties ./
|
||||
COPY --chown=matt:matt permissions.json ./
|
||||
COPY --chown=ubuntu:ubuntu entry.sh ./
|
||||
COPY --chown=ubuntu:ubuntu server.properties ./
|
||||
COPY --chown=ubuntu:ubuntu permissions.json ./
|
||||
|
@ -3,12 +3,11 @@ FROM ubuntu:24.04
|
||||
RUN apt-get update && apt-get -y upgrade
|
||||
RUN apt-get install -y wget bzip2
|
||||
|
||||
RUN useradd -m matt
|
||||
USER matt
|
||||
WORKDIR /home/matt
|
||||
USER ubuntu
|
||||
WORKDIR /home/ubuntu
|
||||
|
||||
RUN wget https://downloads.getmonero.org/cli/monero-linux-x64-v0.18.3.4.tar.bz2 -O monerod.tar.bz2
|
||||
RUN tar xvf monerod.tar.bz2 && rm monerod.tar.bz2
|
||||
RUN mv monero-x86_64-linux-gnu-v0.18.3.4 monero
|
||||
|
||||
COPY --chown=matt:matt entry.sh ./
|
||||
COPY --chown=ubuntu:ubuntu entry.sh ./
|
||||
|
@ -3,13 +3,12 @@ FROM ubuntu:24.04
|
||||
RUN apt-get update && apt-get -y upgrade
|
||||
RUN apt-get install -y wget
|
||||
|
||||
RUN useradd -m matt
|
||||
USER matt
|
||||
WORKDIR /home/matt
|
||||
USER ubuntu
|
||||
WORKDIR /home/ubuntu
|
||||
|
||||
# currently v4.1
|
||||
RUN wget https://github.com/SChernykh/p2pool/releases/download/v4.1/p2pool-v4.1-linux-x64.tar.gz -O p2pool.tar.gz
|
||||
RUN tar xvf p2pool.tar.gz && rm p2pool.tar.gz
|
||||
RUN mv p2pool-v4.1-linux-x64/p2pool ./p2pool
|
||||
|
||||
COPY --chown=matt:matt entry.sh ./
|
||||
COPY --chown=ubuntu:ubuntu entry.sh ./
|
||||
|
@ -3,19 +3,18 @@ FROM ubuntu:24.04
|
||||
RUN apt-get update && apt-get -y upgrade
|
||||
RUN apt-get install -y wget unzip
|
||||
|
||||
RUN useradd -m matt
|
||||
USER matt
|
||||
WORKDIR /home/matt
|
||||
USER ubuntu
|
||||
WORKDIR /home/ubuntu
|
||||
|
||||
# from https://terraria.fandom.com/wiki/Server (currently 1.4.4.9)
|
||||
RUN wget https://terraria.org/api/download/pc-dedicated-server/terraria-server-1449.zip
|
||||
RUN unzip terraria-server-1449.zip && rm terraria-server-1449.zip
|
||||
RUN mv 1449/ server/
|
||||
|
||||
COPY --chown=matt:matt entry.sh ./
|
||||
COPY --chown=ubuntu:ubuntu entry.sh ./
|
||||
|
||||
WORKDIR /home/matt/server/Linux
|
||||
WORKDIR /home/ubuntu/server/Linux
|
||||
|
||||
RUN chmod +x TerrariaServer.bin.x86_64
|
||||
COPY --chown=matt:matt password.default ./password.txt
|
||||
COPY --chown=matt:matt config.txt password.tx[t] ./
|
||||
COPY --chown=ubuntu:ubuntu password.default ./password.txt
|
||||
COPY --chown=ubuntu:ubuntu config.txt password.tx[t] ./
|
||||
|
@ -1,6 +1,6 @@
|
||||
world=/home/matt/worlds/legendary.wld
|
||||
world=/home/ubuntu/worlds/legendary.wld
|
||||
autocreate=3
|
||||
seed=getfixedboi
|
||||
worldname=legendary
|
||||
difficulty=2
|
||||
worldpath=/home/matt/worlds
|
||||
worldpath=/home/ubuntu/worlds
|
||||
|
@ -6,6 +6,7 @@ cleanup() {
|
||||
|
||||
trap 'cleanup' TERM
|
||||
|
||||
rm cmd
|
||||
mkfifo cmd
|
||||
./TerrariaServer.bin.x86_64 -config config.txt -pass $(cat password.txt) < cmd &
|
||||
echo "help\n" > cmd # shell waits for FIFO to be opened for writing before starting program!
|
||||
|
10
volumes.sh
Executable file
10
volumes.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
mkdir website/letsencrypt
|
||||
mkdir website/gitea/config
|
||||
mkdir website/gitea/data
|
||||
mkdir monerod/.bitmonero
|
||||
mkdir p2pool/cache
|
||||
mkdir minecraft/world
|
||||
mkdir minecraft_bedrock/worlds
|
||||
mkdir terraria/worlds
|
Loading…
x
Reference in New Issue
Block a user