prepare deploy

This commit is contained in:
lubiana 2024-06-22 21:47:23 +02:00
parent ec46bf2884
commit c252b8420b
No known key found for this signature in database
5 changed files with 48 additions and 17 deletions

27
deploy/install.sh Normal file → Executable file
View file

@ -1,5 +1,11 @@
#!/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 \
@ -7,20 +13,19 @@ podman pod create \
podman run -d \
--pod futtern \
--name php \
--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 caddy \
--volume
--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
podman genereate systemd \
--files \
--name futtern \
--restart-policy=always \
-t 10
mkdir -p ${HOME}/.config/systemd/user
echo 'yes' | podman exec -it futtern-php /var/www/html/bin/console doctrine:migrations:migrate