new build scripts for server owners, requires testing before calling it done

This commit is contained in:
shockrah 2021-01-25 19:56:05 -08:00
parent cdbb3e79d8
commit 55efbfd85c
2 changed files with 40 additions and 0 deletions

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
# This File basically sets up a fresh alpine install with all the things
# required for setting up a new freechat instance
# First we simply install all the things we may need to build/
RUN apk add mysql
RUN apk add nginx
RUN cargo
RUN apk add git
# Now we being the freechat installation process
RUN git clone https://gitlab.com/shockrah/freechat.git/ /opt/freechat/
RUN cd /opt/freechat/
RUN sh docker-auto-build.sh

26
docker-auto-build.sh Normal file
View File

@ -0,0 +1,26 @@
#!/bin/sh
# Building
cargo_targets="json-api"
mkdir -p bin/
# Statically built binaries make this part really easy
for target in $cargo_targets;do
echo ================================================
echo = =
echo = =
echo = =
echo Building $target
echo = =
echo = =
echo = =
echo ================================================
pushd $target
cargo build --release
cp target/release/$target ../bin/
popd
done
echo Done building