install/uninstall/update/restart scripts
This commit is contained in:
@@ -11,6 +11,7 @@ services:
|
||||
- 9000
|
||||
networks:
|
||||
- app-network
|
||||
platform: ${DOCKER_DEFAULT_PLATFORM:-linux/arm64}
|
||||
|
||||
nginx:
|
||||
image: 'docker.io/bitnami/nginx:1.28'
|
||||
@@ -18,6 +19,7 @@ services:
|
||||
- phpfpm
|
||||
networks:
|
||||
- app-network
|
||||
platform: ${DOCKER_DEFAULT_PLATFORM:-linux/arm64}
|
||||
ports:
|
||||
- '8080:8080'
|
||||
- '443:443'
|
||||
@@ -29,5 +31,6 @@ services:
|
||||
build: ./resticprofile
|
||||
depends_on:
|
||||
- phpfpm
|
||||
platform: ${DOCKER_DEFAULT_PLATFORM:-linux/arm64}
|
||||
volumes:
|
||||
- ./symfony/var:/app/var
|
||||
|
||||
12
install.sh
Executable file
12
install.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eux
|
||||
cd ${LIB_DIR:-/lib}
|
||||
sudo git clone https://git.joeac.net/joeac/joeac.net.git
|
||||
cd joeac.net
|
||||
sudo chmod +x uninstall.sh update_and_restart.sh restart.sh
|
||||
sudo echo << EOF >> ${CRONTABS_DIR:-/etc/cron.d}/joeacnet
|
||||
@reboot ${LIB_DIR:-/lib}/joeac.net/restart.sh
|
||||
10 * * * * ${LIB_DIR:-/lib}/joeac.net/update_and_restart.sh
|
||||
EOF
|
||||
./restart.sh
|
||||
8
restart.sh
Executable file
8
restart.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eux
|
||||
|
||||
cd ${JOEACNET_DIR:-/lib/joeac.net}
|
||||
podman-compose build
|
||||
podman-compose down
|
||||
podman-compose up -d
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM docker.io/creativeprojects/resticprofile:latest
|
||||
FROM docker.io/creativeprojects/resticprofile:0.31.0
|
||||
ENV TZ=UTC
|
||||
|
||||
RUN set -eux && \
|
||||
|
||||
6
uninstall.sh
Executable file
6
uninstall.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eux
|
||||
sudo rm ${CRONTABS_DIR:-/etc/cron.d}/joeacnet
|
||||
sudo rm -rd ${LIB_DIR:-/lib}/joeac.net
|
||||
sudo systemctl restart ${CRON_SERVICE:-crond.service}
|
||||
11
update_and_restart.sh
Executable file
11
update_and_restart.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eux
|
||||
|
||||
cd ${LIB_DIR:-/lib}/joeac.net
|
||||
sudo git fetch origin main
|
||||
if [[ -z "$(git diff origin/main main)" ]]
|
||||
then
|
||||
sudo git pull
|
||||
./restart.sh
|
||||
fi
|
||||
Reference in New Issue
Block a user