Compare commits
No commits in common. "14bb4a15421fcac9c07c43a6ea6cc9468c389896" and "7f2eb7ec65beb9424129c4fbbd4b5c441888eea3" have entirely different histories.
14bb4a1542
...
7f2eb7ec65
8 changed files with 37 additions and 144 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -20,5 +20,5 @@
|
||||||
###< phpunit/phpunit ###
|
###< phpunit/phpunit ###
|
||||||
|
|
||||||
.idea/
|
.idea/
|
||||||
|
/deploy/futtern-app/
|
||||||
/deploy/var/
|
/deploy/var/
|
||||||
/deploy/app/
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[www]
|
[www]
|
||||||
|
|
||||||
user = root
|
user = nobody
|
||||||
group = root
|
group = nobody
|
||||||
listen = 9001
|
listen = 9001
|
||||||
pm = dynamic
|
pm = dynamic
|
||||||
pm.max_children = 5
|
pm.max_children = 5
|
||||||
|
@ -10,4 +10,5 @@ pm.min_spare_servers = 1
|
||||||
pm.max_spare_servers = 3
|
pm.max_spare_servers = 3
|
||||||
env[APP_ENV]=$APP_ENV
|
env[APP_ENV]=$APP_ENV
|
||||||
env[APP_SECRET]=$APP_SECRET
|
env[APP_SECRET]=$APP_SECRET
|
||||||
|
error_log = /var/log/php-fpm.log
|
||||||
catch_workers_output = yes
|
catch_workers_output = yes
|
31
deploy/install.sh
Executable file
31
deploy/install.sh
Executable file
|
@ -0,0 +1,31 @@
|
||||||
|
#!/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
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
TARGETDIR='deploy/app'
|
TARGETDIR='deploy/futtern-app'
|
||||||
|
|
||||||
if [ -d $TARGETDIR ]; then
|
if [ -d $TARGETDIR ]; then
|
||||||
rm -rf $TARGETDIR
|
rm -rf $TARGETDIR
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
# 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 %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 \
|
|
||||||
--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
|
|
|
@ -1,46 +0,0 @@
|
||||||
# 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 %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
|
|
||||||
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
|
|
|
@ -1,42 +0,0 @@
|
||||||
# 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/%U/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
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/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
|
|
Loading…
Reference in a new issue