install for developer

This commit is contained in:
Darren 2023-10-12 10:19:27 +08:00 committed by GitHub
parent e438fbd7d4
commit 862b7911ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 27 additions and 13 deletions

View file

@ -1 +1 @@
1. Fix install error: Firewalld for cockpit
1. Add install: developer mode at install.sh

View file

@ -1,3 +1,4 @@
FROM websoft9dev/apphub:0.0.5 as buildstage
ARG APPHUB_VERSION
FROM websoft9dev/apphub:${APPHUB_VERSION} as buildstage
RUN mkdir -p /websoft9/src
RUN sed -i 's/supervisorctl start apphub/supervisorctl start apphubdev/g' /entrypoint.sh

View file

@ -1,3 +1,6 @@
# this file for developer
# install --devto "/data/mysource"
version: "3.8"
services:
@ -7,6 +10,8 @@ services:
build:
context: .
dockerfile: ./apphub/Dockerfiledev
args:
- APPHUB_VERSION=${APPHUB_VERSION}
ports:
- 9001-9999:8080
restart: always

View file

@ -4,8 +4,6 @@ services:
apphub:
image: websoft9dev/apphub:$APPHUB_VERSION
container_name: websoft9-apphub
ports:
- 9001-9999:8080
restart: always
volumes:
- apphub_logs:/websoft9/apphub/logs
@ -15,13 +13,13 @@ services:
- deployment
- git
- proxy
labels:
com.docker.compose.w9_http.port: 8080
deployment:
image: websoft9dev/deployment:$DEPLOYMENT_VERSION
container_name: websoft9-deployment
restart: always
ports:
- 9001-9999:9000
volumes:
- portainer:/data
- /data/compose:/data/compose
@ -38,8 +36,6 @@ services:
- gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- 9001-9999:3000
environment:
- INSTALL_LOCK=true
- DISABLE_SSH=true
@ -58,7 +54,6 @@ services:
ports:
- "80:80"
- "443:443"
- "9001-9999:81"
volumes:
- nginx_data:/data
- nginx_letsencrypt:/etc/letsencrypt

View file

@ -55,6 +55,10 @@ while [[ $# -gt 0 ]]; do
path="$2"
shift 2
;;
--devto)
path="$2"
shift 2
;;
*)
shift
;;
@ -75,6 +79,7 @@ echo "--version: $version"
echo "--port: $port"
echo "--channel: $channel"
echo "--path: $path"
echo "--devto: $devto"
echo -e "\nYour OS: "
cat /etc/os-release | head -n 3 2>/dev/null
@ -293,8 +298,16 @@ install_backends() {
fi
fi
# set to devloper mode
if [ -n "$devto" ]; then
sed -i "s|.*:/websoft9/src|$devto:/websoft9/src|g" docker-compose-dev.yml
composefile=docker-compose-dev.yml
else
composefile=docker-compose.yml
fi
container_names=$(docker ps -a --format "{{.Names}}" --filter "name=websoft9")
sudo docker compose -p websoft9 down
sudo docker compose -p websoft9 -f $composefile down
# delete some dead containers that docker compose cannot deleted
if [ ! -z "$container_names" ]; then
@ -305,8 +318,8 @@ install_backends() {
echo "No containers to delete."
fi
sudo docker compose -p websoft9 pull
sudo docker compose -p websoft9 up -d
sudo docker compose -f $composefile pull
sudo docker compose -p websoft9 -f $composefile up -d --build
if [ $? -ne 0 ]; then
echo "Failed to start docker services."
exit 1

View file

@ -1,5 +1,5 @@
{
"version": "0.8.26-rc22",
"version": "0.8.26-rc23",
"plugins": {
"portainer": "0.0.6",
"nginx": "0.0.5",