Moving sample.env into the auto build script and using a reworked freechat docker image on hub.docker.com
This commit is contained in:
parent
c3d9e2d3b3
commit
aa5cd8c4ac
@ -34,6 +34,23 @@ build_cargo_targets() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
create_sample_env() {
|
||||||
|
cat > .env <<EOF
|
||||||
|
# Mysql key data
|
||||||
|
DATABASE_NAME=
|
||||||
|
DATABASE_PASS=
|
||||||
|
DATABASE_USER=
|
||||||
|
DATABASE_HOST=
|
||||||
|
|
||||||
|
# Server meta things
|
||||||
|
SERVER_NAME="Freechat Dev Server"
|
||||||
|
SERVER_DESCRIPTION="Server for sick development things"
|
||||||
|
SERVER_URL=localhost
|
||||||
|
SERVER_PORT=8888
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
show_help() {
|
show_help() {
|
||||||
@ -66,6 +83,7 @@ if [ $ask_help = "true" ];then
|
|||||||
else
|
else
|
||||||
# normal building process
|
# normal building process
|
||||||
build_cargo_targets
|
build_cargo_targets
|
||||||
|
create_sample_env
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,35 +0,0 @@
|
|||||||
FROM mysql:8.0
|
|
||||||
|
|
||||||
# Prelim updates
|
|
||||||
RUN apt-get update
|
|
||||||
|
|
||||||
# Reasoning for each:
|
|
||||||
# git: Pulling from git remotes
|
|
||||||
# nginx: reverse proxy + offloading https responsibility to it
|
|
||||||
# that last point avoids slow loris attacks as nginx is hardened against them
|
|
||||||
# curl: download rustup setup script
|
|
||||||
# libmysqlclient-dev: required for building json-api to connect to mysql servers
|
|
||||||
# build-essential: compiling rust
|
|
||||||
# libssl-dev: for compiling json-api
|
|
||||||
RUN apt-get install git nginx \
|
|
||||||
curl libmysqlclient-dev build-essential \
|
|
||||||
libssl-dev \
|
|
||||||
-y --no-install-recommends
|
|
||||||
|
|
||||||
|
|
||||||
# Default rust toolchain
|
|
||||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
||||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | \
|
|
||||||
sh -s -- --default-toolchain=stable
|
|
||||||
|
|
||||||
ENV path="/root/.cargo/bin:${PATH}"
|
|
||||||
|
|
||||||
|
|
||||||
# Now we being the freechat installation process
|
|
||||||
RUN git clone https://gitlab.com/shockrah/freechat.git/ /opt/freechat/
|
|
||||||
WORKDIR /opt/freechat/
|
|
||||||
RUN sh docker-auto-build.sh --no-cargo-cache
|
|
||||||
|
|
||||||
# Sample env file to copy into the base image
|
|
||||||
# All keys present but not set to anything(null)
|
|
||||||
COPY sample.env /opt/freechat/.env
|
|
@ -1,11 +0,0 @@
|
|||||||
# Mysql key data
|
|
||||||
DATABASE_NAME=
|
|
||||||
DATABASE_PASS=
|
|
||||||
DATABASE_USER=
|
|
||||||
DATABASE_HOST=
|
|
||||||
|
|
||||||
# Server meta things
|
|
||||||
SERVER_NAME="Freechat Dev Server"
|
|
||||||
SERVER_DESCRIPTION="Server for sick development things"
|
|
||||||
SERVER_URL=localhost
|
|
||||||
SERVER_PORT=8888
|
|
Loading…
Reference in New Issue
Block a user