From 0661f5dd3feb096fa257359bdaf8dd6e4a53c55b Mon Sep 17 00:00:00 2001 From: lubiana Date: Sat, 22 Jun 2024 22:20:51 +0200 Subject: [PATCH 1/4] more-deployment --- .forgejo/workflows/release.yml | 7 +++++-- deploy/prepare-deploy.sh | 10 +--------- public/static/img/slice-of-pizza.png | Bin 0 -> 22501 bytes templates/base.html.twig | 2 +- 4 files changed, 7 insertions(+), 12 deletions(-) create mode 100644 public/static/img/slice-of-pizza.png diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index 9602add..a1c6c78 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -16,5 +16,8 @@ jobs: git clone --branch $GITHUB_REF_NAME https://${TOKEN}@${GIT_SERVER}/${REPO}.git . git fetch git checkout ${{ github.head_ref }} - - name: list - run: ls + - name: prepare deploy + run: sh ./deploy/prepare-deploy.sh + + + diff --git a/deploy/prepare-deploy.sh b/deploy/prepare-deploy.sh index c0ad1ed..53f4e46 100644 --- a/deploy/prepare-deploy.sh +++ b/deploy/prepare-deploy.sh @@ -17,14 +17,6 @@ done rm ./bin/phpunit APP_ENV=prod composer install --no-dev -a -mkdir -p ~/.ssh/ -# Print the SSH key, replacing newline characters with actual new lines -echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa -# Set appropriate permissions for the SSH key -chmod 600 ~/.ssh/id_rsa -# Add the remote host's key to the known_hosts file to avoid authenticity confirmation -ssh-keyscan -H $HOST >> ~/.ssh/known_hosts -# SCP files to the remote host -rsync -avz --delete public/ ${USERNAME}@${HOST}:${TARGETDIR} + diff --git a/public/static/img/slice-of-pizza.png b/public/static/img/slice-of-pizza.png new file mode 100644 index 0000000000000000000000000000000000000000..300e7e73f58771df77ac33d9f349463cd4b095f7 GIT binary patch literal 22501 zcmX`T1zgn6^FMxcNq2Wkqk<>hNOyOLfV2nF2$B*WDcvoKbR6A{fb`KNaCFD-#ryOB ze|;z@w>vvCJM)~`*;yks)D&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ep2)X1h01e$~|#W*ay^<_ZiAyYX;A!qN&x<|G3zEWzD0u<9Kvrn5V}1o}nlU^zCGE+>s;!!WYWlib-J2WrUO+O-aT|yg8`L?Ym~1 zbwzXrT)kJ32*gfs^&ZGF^5oB4_rWjC$(cjtI3}g>_f)r|3Iw-P*wUM4KP4@tWLUl+ zf!6+S-_EzJ(P7>>*Iib;*w*Stt=OTTnF}NE3AZcd6>vm1;LU+Ym18vn1XoaRFEhp^ zc8LE}L(3Jbn=DklqB8%vQGMvWrF|@uy5p`M2=Yh%hS8yI-k5yYRgAMPdo8P>=-2HM z?c%y%!6u#KK%q-RvW2PzOLJ>F9oBTUgF3O^F?}J9o%R7>ua#O}UXTEzD_E{y4yRa| zoh11HCdu5X9Q*m6Zmo(BiOi9Fqml+*5_o|4?fTJNUBS+5S$*VmX(j@RUpE9`3e_0B z?k%HzO_XYzsA~9kSl+|(C-1Z&p(ga1ui1_Av&aTaSETu~$cIOj7^*OMe;-B!Jf()U z4TCJxT0d{E?7vs40fCF=g?h&7hTXs*Q!E40XH2huqpQQYE=UMsXLtDIuFu;=$Lb=0 zv6dJ(H?dYQ^H2=QMBo3k36^sMTfoki{}$&A7d^LYeL;J)Gz3A`O)s8K@gkbf^expt zt68@9z;{xBjjn;faHc?xGBCZ?^3R-1+whMzACiS2Vw#E0yAQp~A}%|fqG?a~S8aQB zMVlz#Vr>@Mqh$&vN0cxNy+V {% block title %}Welcome!{% endblock %} - + -- 2.39.5 From 7f2eb7ec65beb9424129c4fbbd4b5c441888eea3 Mon Sep 17 00:00:00 2001 From: lubiana Date: Sun, 23 Jun 2024 08:27:17 +0200 Subject: [PATCH 2/4] update fpm config --- deploy/Dockerfile | 2 -- deploy/etc/php83/php-fpm.d/www.conf | 6 +++++- deploy/prepare-deploy.sh | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) delete mode 100644 deploy/Dockerfile mode change 100644 => 100755 deploy/prepare-deploy.sh diff --git a/deploy/Dockerfile b/deploy/Dockerfile deleted file mode 100644 index 47bc55b..0000000 --- a/deploy/Dockerfile +++ /dev/null @@ -1,2 +0,0 @@ -FROM git.php.fail/lubiana/container/php:8.3 as phpbuild - diff --git a/deploy/etc/php83/php-fpm.d/www.conf b/deploy/etc/php83/php-fpm.d/www.conf index 113b8c2..edf975a 100644 --- a/deploy/etc/php83/php-fpm.d/www.conf +++ b/deploy/etc/php83/php-fpm.d/www.conf @@ -7,4 +7,8 @@ pm = dynamic pm.max_children = 5 pm.start_servers = 2 pm.min_spare_servers = 1 -pm.max_spare_servers = 3 \ No newline at end of file +pm.max_spare_servers = 3 +env[APP_ENV]=$APP_ENV +env[APP_SECRET]=$APP_SECRET +error_log = /var/log/php-fpm.log +catch_workers_output = yes \ No newline at end of file diff --git a/deploy/prepare-deploy.sh b/deploy/prepare-deploy.sh old mode 100644 new mode 100755 index 53f4e46..d8c92fa --- a/deploy/prepare-deploy.sh +++ b/deploy/prepare-deploy.sh @@ -1,6 +1,6 @@ #!/usr/bin/env sh -TARGETDIR='futtern-app' +TARGETDIR='deploy/futtern-app' if [ -d $TARGETDIR ]; then rm -rf $TARGETDIR @@ -8,7 +8,7 @@ fi mkdir $TARGETDIR cd $TARGETDIR || return -pathsToCopy="public bin config migrations src templates composer.json composer.lock symfony.lock .env etc" +pathsToCopy="public bin config migrations src templates composer.json composer.lock symfony.lock .env" for path in $pathsToCopy do -- 2.39.5 From 38a2de58589ec00585166920a9a6ebc51b6f9be7 Mon Sep 17 00:00:00 2001 From: lubiana Date: Sun, 23 Jun 2024 08:49:44 +0200 Subject: [PATCH 3/4] add unit files --- deploy/etc/php83/php-fpm.d/www.conf | 7 ++- .../systemd/container-futtern-caddy.service | 43 +++++++++++++++++ deploy/systemd/container-futtern-php.service | 46 +++++++++++++++++++ deploy/systemd/pod-futtern.service | 42 +++++++++++++++++ deploy/update.sh | 8 ++++ 5 files changed, 142 insertions(+), 4 deletions(-) create mode 100644 deploy/systemd/container-futtern-caddy.service create mode 100644 deploy/systemd/container-futtern-php.service create mode 100644 deploy/systemd/pod-futtern.service create mode 100644 deploy/update.sh diff --git a/deploy/etc/php83/php-fpm.d/www.conf b/deploy/etc/php83/php-fpm.d/www.conf index edf975a..e5a895d 100644 --- a/deploy/etc/php83/php-fpm.d/www.conf +++ b/deploy/etc/php83/php-fpm.d/www.conf @@ -1,7 +1,7 @@ [www] -user = nobody -group = nobody +user = root +group = root listen = 9001 pm = dynamic pm.max_children = 5 @@ -10,5 +10,4 @@ pm.min_spare_servers = 1 pm.max_spare_servers = 3 env[APP_ENV]=$APP_ENV env[APP_SECRET]=$APP_SECRET -error_log = /var/log/php-fpm.log -catch_workers_output = yes \ No newline at end of file +catch_workers_output = yes diff --git a/deploy/systemd/container-futtern-caddy.service b/deploy/systemd/container-futtern-caddy.service new file mode 100644 index 0000000..2c7e3f6 --- /dev/null +++ b/deploy/systemd/container-futtern-caddy.service @@ -0,0 +1,43 @@ +# container-futtern-caddy.service +# autogenerated by Podman 4.3.1 +# Sun Jun 23 05:33:51 UTC 2024 + +[Unit] +Description=Podman container-futtern-caddy.service +Documentation=man:podman-generate-systemd(1) +Wants=network-online.target +After=network-online.target +RequiresMountsFor=%t/containers +BindsTo=pod-futtern.service +After=pod-futtern.service + +[Service] +Environment=PODMAN_SYSTEMD_UNIT=%n +Restart=on-failure +TimeoutStopSec=70 +ExecStartPre=/bin/rm \ + -f %t/%n.ctr-id +ExecStart=/usr/bin/podman run \ + --cidfile=%t/%n.ctr-id \ + --cgroups=no-conmon \ + --rm \ + --pod-id-file %t/pod-futtern.pod-id \ + --sdnotify=conmon \ + --replace \ + -d \ + --name futtern-caddy \ + --volume /home/c3h-futtern/etc/caddy/Caddyfile:/etc/caddy/Caddyfile \ + --volume /home/c3h-futtern/futtern-app:/var/www/html \ + --volume caddy_data:/data docker.io/caddy/caddy:alpine +ExecStop=/usr/bin/podman stop \ + --ignore -t 10 \ + --cidfile=%t/%n.ctr-id +ExecStopPost=/usr/bin/podman rm \ + -f \ + --ignore -t 10 \ + --cidfile=%t/%n.ctr-id +Type=notify +NotifyAccess=all + +[Install] +WantedBy=default.target diff --git a/deploy/systemd/container-futtern-php.service b/deploy/systemd/container-futtern-php.service new file mode 100644 index 0000000..cec0498 --- /dev/null +++ b/deploy/systemd/container-futtern-php.service @@ -0,0 +1,46 @@ +# container-futtern-php.service +# autogenerated by Podman 4.3.1 +# Sun Jun 23 05:33:51 UTC 2024 + +[Unit] +Description=Podman container-futtern-php.service +Documentation=man:podman-generate-systemd(1) +Wants=network-online.target +After=network-online.target +RequiresMountsFor=%t/containers +BindsTo=pod-futtern.service +After=pod-futtern.service + +[Service] +Environment=PODMAN_SYSTEMD_UNIT=%n +Restart=on-failure +TimeoutStopSec=70 +ExecStartPre=/bin/rm \ + -f %t/%n.ctr-id +ExecStart=/usr/bin/podman run \ + --cidfile=%t/%n.ctr-id \ + --cgroups=no-conmon \ + --rm \ + --pod-id-file %t/pod-futtern.pod-id \ + --sdnotify=conmon \ + --replace \ + -d \ + --name futtern-php \ + --volume /home/c3h-futtern/etc/php83/php-fpm.d/www.conf:/etc/php83/php-fpm.d/www.conf \ + --volume /home/c3h-futtern/futtern-app:/var/www/html \ + --volume /home/c3h-futtern/var:/var/www/html/var \ + --env APP_ENV=prod \ + --env APP_SECRET=UwUtHiSisNotSecurePlZcHanGeMe \ + git.php.fail/lubiana/container/php:8.3-fpm +ExecStop=/usr/bin/podman stop \ + --ignore -t 10 \ + --cidfile=%t/%n.ctr-id +ExecStopPost=/usr/bin/podman rm \ + -f \ + --ignore -t 10 \ + --cidfile=%t/%n.ctr-id +Type=notify +NotifyAccess=all + +[Install] +WantedBy=default.target diff --git a/deploy/systemd/pod-futtern.service b/deploy/systemd/pod-futtern.service new file mode 100644 index 0000000..3189e8c --- /dev/null +++ b/deploy/systemd/pod-futtern.service @@ -0,0 +1,42 @@ +# pod-futtern.service +# autogenerated by Podman 4.3.1 +# Sun Jun 23 05:33:51 UTC 2024 + +[Unit] +Description=Podman pod-futtern.service +Documentation=man:podman-generate-systemd(1) +Wants=network-online.target +After=network-online.target +RequiresMountsFor=/run/user/1006/containers +Wants=container-futtern-caddy.service container-futtern-php.service +Before=container-futtern-caddy.service container-futtern-php.service + +[Service] +Environment=PODMAN_SYSTEMD_UNIT=%n +Restart=on-failure +TimeoutStopSec=70 +ExecStartPre=/bin/rm \ + -f %t/pod-futtern.pid %t/pod-futtern.pod-id +ExecStartPre=/usr/bin/podman pod create \ + --infra-conmon-pidfile %t/pod-futtern.pid \ + --pod-id-file %t/pod-futtern.pod-id \ + --exit-policy=stop \ + --label io.containers.autoupdate=registry \ + --name futtern \ + -p 8087:8087 \ + --replace +ExecStart=/usr/bin/podman pod start \ + --pod-id-file %t/pod-futtern.pod-id +ExecStop=/usr/bin/podman pod stop \ + --ignore \ + --pod-id-file %t/pod-futtern.pod-id \ + -t 10 +ExecStopPost=/usr/bin/podman pod rm \ + --ignore \ + -f \ + --pod-id-file %t/pod-futtern.pod-id +PIDFile=%t/pod-futtern.pid +Type=forking + +[Install] +WantedBy=default.target diff --git a/deploy/update.sh b/deploy/update.sh new file mode 100644 index 0000000..4d7548a --- /dev/null +++ b/deploy/update.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env sh + +systemctl --user stop pod-futtern +systemctl --user start pod-futtern +sleep 2 +podman exec -it futtern-php /var/www/html/bin/console cache:clear +podman exec -it futtern-php /var/www/html/bin/console cache:warmup +echo 'yes' | podman exec -it futtern-php /var/www/html/bin/console doctrine:migrations:migrate -- 2.39.5 From 14bb4a15421fcac9c07c43a6ea6cc9468c389896 Mon Sep 17 00:00:00 2001 From: lubiana Date: Sun, 23 Jun 2024 09:21:20 +0200 Subject: [PATCH 4/4] update deployment paths --- .gitignore | 2 +- deploy/install.sh | 31 ------------------- deploy/prepare-deploy.sh | 2 +- .../systemd/container-futtern-caddy.service | 4 +-- deploy/systemd/container-futtern-php.service | 6 ++-- deploy/systemd/pod-futtern.service | 2 +- 6 files changed, 8 insertions(+), 39 deletions(-) delete mode 100755 deploy/install.sh diff --git a/.gitignore b/.gitignore index 62752be..feabc44 100644 --- a/.gitignore +++ b/.gitignore @@ -20,5 +20,5 @@ ###< phpunit/phpunit ### .idea/ -/deploy/futtern-app/ /deploy/var/ +/deploy/app/ diff --git a/deploy/install.sh b/deploy/install.sh deleted file mode 100755 index d4b64b7..0000000 --- a/deploy/install.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env sh - -if [ ! -d "var" ]; then - mkdir var -fi -podman pod stop futtern -podman pod rm futtern - -podman pod create \ - --label "io.containers.autoupdate=registry" \ - --name futtern \ - -p 8087:8087 - -podman run -d \ - --pod futtern \ - --name futtern-php \ - --volume $(pwd)/etc/php83/php-fpm.d/www.conf:/etc/php83/php-fpm.d/www.conf \ - --volume $(pwd)/futtern-app:/var/www/html \ - --volume $(pwd)/var:/var/www/html/var \ - --env 'APP_ENV=prod' \ - git.php.fail/lubiana/container/php:8.3-fpm - -podman run -d \ - --pod futtern \ - --name futtern-caddy \ - --volume $(pwd)/etc/caddy/Caddyfile:/etc/caddy/Caddyfile \ - --volume $(pwd)/futtern-app:/var/www/html \ - --volume caddy_data:/data \ - docker.io/caddy/caddy:alpine - -echo 'yes' | podman exec -it futtern-php /var/www/html/bin/console doctrine:migrations:migrate diff --git a/deploy/prepare-deploy.sh b/deploy/prepare-deploy.sh index d8c92fa..5bb412a 100755 --- a/deploy/prepare-deploy.sh +++ b/deploy/prepare-deploy.sh @@ -1,6 +1,6 @@ #!/usr/bin/env sh -TARGETDIR='deploy/futtern-app' +TARGETDIR='deploy/app' if [ -d $TARGETDIR ]; then rm -rf $TARGETDIR diff --git a/deploy/systemd/container-futtern-caddy.service b/deploy/systemd/container-futtern-caddy.service index 2c7e3f6..1067128 100644 --- a/deploy/systemd/container-futtern-caddy.service +++ b/deploy/systemd/container-futtern-caddy.service @@ -26,8 +26,8 @@ ExecStart=/usr/bin/podman run \ --replace \ -d \ --name futtern-caddy \ - --volume /home/c3h-futtern/etc/caddy/Caddyfile:/etc/caddy/Caddyfile \ - --volume /home/c3h-futtern/futtern-app:/var/www/html \ + --volume %h/futtern/etc/caddy/Caddyfile:/etc/caddy/Caddyfile \ + --volume %h/futtern/app:/var/www/html \ --volume caddy_data:/data docker.io/caddy/caddy:alpine ExecStop=/usr/bin/podman stop \ --ignore -t 10 \ diff --git a/deploy/systemd/container-futtern-php.service b/deploy/systemd/container-futtern-php.service index cec0498..e6f139c 100644 --- a/deploy/systemd/container-futtern-php.service +++ b/deploy/systemd/container-futtern-php.service @@ -26,9 +26,9 @@ ExecStart=/usr/bin/podman run \ --replace \ -d \ --name futtern-php \ - --volume /home/c3h-futtern/etc/php83/php-fpm.d/www.conf:/etc/php83/php-fpm.d/www.conf \ - --volume /home/c3h-futtern/futtern-app:/var/www/html \ - --volume /home/c3h-futtern/var:/var/www/html/var \ + --volume %h/futtern/etc/php83/php-fpm.d/www.conf:/etc/php83/php-fpm.d/www.conf \ + --volume %h/futtern/app:/var/www/html \ + --volume %h/futtern/app/var:/var/www/html/var \ --env APP_ENV=prod \ --env APP_SECRET=UwUtHiSisNotSecurePlZcHanGeMe \ git.php.fail/lubiana/container/php:8.3-fpm diff --git a/deploy/systemd/pod-futtern.service b/deploy/systemd/pod-futtern.service index 3189e8c..10a8fb0 100644 --- a/deploy/systemd/pod-futtern.service +++ b/deploy/systemd/pod-futtern.service @@ -7,7 +7,7 @@ Description=Podman pod-futtern.service Documentation=man:podman-generate-systemd(1) Wants=network-online.target After=network-online.target -RequiresMountsFor=/run/user/1006/containers +RequiresMountsFor=/run/user/%U/containers Wants=container-futtern-caddy.service container-futtern-php.service Before=container-futtern-caddy.service container-futtern-php.service -- 2.39.5