work-on-deployment #15
6 changed files with 8 additions and 39 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,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
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
TARGETDIR='deploy/futtern-app'
|
TARGETDIR='deploy/app'
|
||||||
|
|
||||||
if [ -d $TARGETDIR ]; then
|
if [ -d $TARGETDIR ]; then
|
||||||
rm -rf $TARGETDIR
|
rm -rf $TARGETDIR
|
||||||
|
|
|
@ -26,8 +26,8 @@ ExecStart=/usr/bin/podman run \
|
||||||
--replace \
|
--replace \
|
||||||
-d \
|
-d \
|
||||||
--name futtern-caddy \
|
--name futtern-caddy \
|
||||||
--volume /home/c3h-futtern/etc/caddy/Caddyfile:/etc/caddy/Caddyfile \
|
--volume %h/futtern/etc/caddy/Caddyfile:/etc/caddy/Caddyfile \
|
||||||
--volume /home/c3h-futtern/futtern-app:/var/www/html \
|
--volume %h/futtern/app:/var/www/html \
|
||||||
--volume caddy_data:/data docker.io/caddy/caddy:alpine
|
--volume caddy_data:/data docker.io/caddy/caddy:alpine
|
||||||
ExecStop=/usr/bin/podman stop \
|
ExecStop=/usr/bin/podman stop \
|
||||||
--ignore -t 10 \
|
--ignore -t 10 \
|
||||||
|
|
|
@ -26,9 +26,9 @@ ExecStart=/usr/bin/podman run \
|
||||||
--replace \
|
--replace \
|
||||||
-d \
|
-d \
|
||||||
--name futtern-php \
|
--name futtern-php \
|
||||||
--volume /home/c3h-futtern/etc/php83/php-fpm.d/www.conf:/etc/php83/php-fpm.d/www.conf \
|
--volume %h/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 %h/futtern/app:/var/www/html \
|
||||||
--volume /home/c3h-futtern/var:/var/www/html/var \
|
--volume %h/futtern/app/var:/var/www/html/var \
|
||||||
--env APP_ENV=prod \
|
--env APP_ENV=prod \
|
||||||
--env APP_SECRET=UwUtHiSisNotSecurePlZcHanGeMe \
|
--env APP_SECRET=UwUtHiSisNotSecurePlZcHanGeMe \
|
||||||
git.php.fail/lubiana/container/php:8.3-fpm
|
git.php.fail/lubiana/container/php:8.3-fpm
|
||||||
|
|
|
@ -7,7 +7,7 @@ Description=Podman pod-futtern.service
|
||||||
Documentation=man:podman-generate-systemd(1)
|
Documentation=man:podman-generate-systemd(1)
|
||||||
Wants=network-online.target
|
Wants=network-online.target
|
||||||
After=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
|
Wants=container-futtern-caddy.service container-futtern-php.service
|
||||||
Before=container-futtern-caddy.service container-futtern-php.service
|
Before=container-futtern-caddy.service container-futtern-php.service
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue