mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-14 01:37:48 -05:00
fixed up
This commit is contained in:
@@ -10,7 +10,7 @@ ARG REACT_APP_SITE_NAME
|
|||||||
ARG REACT_APP_ADMIN_EMAIL
|
ARG REACT_APP_ADMIN_EMAIL
|
||||||
ARG NODE_ENV
|
ARG NODE_ENV
|
||||||
COPY package.json ./
|
COPY package.json ./
|
||||||
RUN npm install --also=dev
|
RUN npm install --include=dev
|
||||||
COPY . ./
|
COPY . ./
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
RUN env
|
RUN env
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ ARG REACT_APP_SITE_NAME
|
|||||||
ARG REACT_APP_ADMIN_EMAIL
|
ARG REACT_APP_ADMIN_EMAIL
|
||||||
ARG NODE_ENV
|
ARG NODE_ENV
|
||||||
COPY package.json ./
|
COPY package.json ./
|
||||||
RUN npm install --also=dev
|
RUN npm install --include=dev
|
||||||
COPY . ./
|
COPY . ./
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
|
|||||||
@@ -181,7 +181,3 @@ services:
|
|||||||
driver: syslog
|
driver: syslog
|
||||||
options:
|
options:
|
||||||
tag: "frontend"
|
tag: "frontend"
|
||||||
|
|
||||||
networks:
|
|
||||||
proxy:
|
|
||||||
node:
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ ARG REACT_APP_FRONTEND_SERVER
|
|||||||
ARG REACT_APP_GOOGLE_ANALYTICS
|
ARG REACT_APP_GOOGLE_ANALYTICS
|
||||||
ARG NODE_ENV
|
ARG NODE_ENV
|
||||||
COPY package.json ./
|
COPY package.json ./
|
||||||
RUN npm install --also=dev
|
RUN npm install --include=dev
|
||||||
COPY . ./
|
COPY . ./
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
|
|||||||
@@ -10,12 +10,12 @@ fi
|
|||||||
|
|
||||||
# Rest of the script...
|
# Rest of the script...
|
||||||
|
|
||||||
if ! [ -x "$(command -v docker-compose)" ]; then
|
if ! [ -x "$(command -v docker compose)" ]; then
|
||||||
echo 'Error: docker-compose is not installed.' >&2
|
echo 'Error: docker compose is not installed.' >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
domains=($REACT_APP_FRONTEND_SERVER, $REACT_APP_BACKEND_SERVER, "https://socket.${DOMAIN_NAME}", $REACT_APP_ACCOUNT_SERVER, $REACT_APP_ADMIN_SERVER)
|
domains=("$DOMAIN_NAME" "account.$DOMAIN_NAME" "admin.$DOMAIN_NAME" "api.$DOMAIN_NAME")
|
||||||
|
|
||||||
rsa_key_size=4096
|
rsa_key_size=4096
|
||||||
data_path="./data/certbot"
|
data_path="./data/certbot"
|
||||||
@@ -41,7 +41,7 @@ fi
|
|||||||
echo "### Creating dummy certificate for $domains ..."
|
echo "### Creating dummy certificate for $domains ..."
|
||||||
path="/etc/letsencrypt/live/$domains"
|
path="/etc/letsencrypt/live/$domains"
|
||||||
mkdir -p "$data_path/conf/live/$domains"
|
mkdir -p "$data_path/conf/live/$domains"
|
||||||
docker-compose run --rm --entrypoint "\
|
docker compose run --rm --entrypoint "\
|
||||||
openssl req -x509 -nodes -newkey rsa:$rsa_key_size -days 1\
|
openssl req -x509 -nodes -newkey rsa:$rsa_key_size -days 1\
|
||||||
-keyout '$path/privkey.pem' \
|
-keyout '$path/privkey.pem' \
|
||||||
-out '$path/fullchain.pem' \
|
-out '$path/fullchain.pem' \
|
||||||
@@ -50,11 +50,11 @@ echo
|
|||||||
|
|
||||||
|
|
||||||
echo "### Starting nginx ..."
|
echo "### Starting nginx ..."
|
||||||
docker-compose up --force-recreate -d nginx
|
docker compose up -d nginx
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo "### Deleting dummy certificate for $domains ..."
|
echo "### Deleting dummy certificate for $domains ..."
|
||||||
docker-compose run --rm --entrypoint "\
|
docker compose run --rm --entrypoint "\
|
||||||
rm -Rf /etc/letsencrypt/live/$domains && \
|
rm -Rf /etc/letsencrypt/live/$domains && \
|
||||||
rm -Rf /etc/letsencrypt/archive/$domains && \
|
rm -Rf /etc/letsencrypt/archive/$domains && \
|
||||||
rm -Rf /etc/letsencrypt/renewal/$domains.conf" certbot
|
rm -Rf /etc/letsencrypt/renewal/$domains.conf" certbot
|
||||||
@@ -77,7 +77,7 @@ esac
|
|||||||
# Enable staging mode if needed
|
# Enable staging mode if needed
|
||||||
if [ $staging != "0" ]; then staging_arg="--staging"; fi
|
if [ $staging != "0" ]; then staging_arg="--staging"; fi
|
||||||
|
|
||||||
docker-compose run --rm --entrypoint "\
|
docker compose run --rm --entrypoint "\
|
||||||
certbot certonly --webroot -w /var/www/certbot \
|
certbot certonly --webroot -w /var/www/certbot \
|
||||||
$staging_arg \
|
$staging_arg \
|
||||||
$email_arg \
|
$email_arg \
|
||||||
@@ -88,4 +88,4 @@ docker-compose run --rm --entrypoint "\
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
echo "### Reloading nginx ..."
|
echo "### Reloading nginx ..."
|
||||||
docker-compose exec nginx nginx -s reload
|
docker compose exec nginx nginx -s reload
|
||||||
Reference in New Issue
Block a user