new build scripts for server owners, requires testing before calling it done
This commit is contained in:
parent
cdbb3e79d8
commit
55efbfd85c
14
Dockerfile
Normal file
14
Dockerfile
Normal 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
26
docker-auto-build.sh
Normal 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
|
Loading…
Reference in New Issue
Block a user