Compare commits

..

No commits in common. "c252b8420bdb0571d20223a4b1e13bee5e3e9b15" and "167ece94d45c53744b4911c4497ce6e04adb481f" have entirely different histories.

9 changed files with 4 additions and 106 deletions

View file

@ -1,20 +0,0 @@
on:
release
jobs:
ls:
runs-on: docker
container:
image: git.php.fail/lubiana/container/php:ci
steps:
- name: Manually checkout
env:
REPO: '${{ github.repository }}'
TOKEN: '${{ secrets.GITHUB_TOKEN }}'
BRANCH: '${{ env.GITHUB_REF_NAME }}'
GIT_SERVER: 'hannover.ccc.de/gitlab'
run: |
git clone --branch $GITHUB_REF_NAME https://${TOKEN}@${GIT_SERVER}/${REPO}.git .
git fetch
git checkout ${{ github.head_ref }}
- name: list
run: ls

2
.gitignore vendored
View file

@ -20,5 +20,3 @@
###< phpunit/phpunit ### ###< phpunit/phpunit ###
.idea/ .idea/
/deploy/futtern-app/
/deploy/var/

View file

@ -70,12 +70,12 @@
"assets:install %PUBLIC_DIR%": "symfony-cmd" "assets:install %PUBLIC_DIR%": "symfony-cmd"
}, },
"post-install-cmd": [ "post-install-cmd": [
"@auto-scripts"
],
"post-update-cmd": [
"@auto-scripts", "@auto-scripts",
"config-transformer switch-format config" "config-transformer switch-format config"
], ],
"post-update-cmd": [
"@auto-scripts"
],
"lint": [ "lint": [
"rector", "rector",
"ecs --fix || ecs --fix" "ecs --fix || ecs --fix"

View file

@ -1,2 +0,0 @@
FROM git.php.fail/lubiana/container/php:8.3 as phpbuild

View file

@ -1,7 +0,0 @@
:8087 {
log
root * /var/www/html/public
php_fastcgi localhost:9001
file_server
encode zstd gzip
}

View file

@ -1,10 +0,0 @@
[www]
user = nobody
group = nobody
listen = 9001
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3

View file

@ -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

View file

@ -1,30 +0,0 @@
#!/usr/bin/env sh
TARGETDIR='futtern-app'
if [ -d $TARGETDIR ]; then
rm -rf $TARGETDIR
fi
mkdir $TARGETDIR
cd $TARGETDIR || return
pathsToCopy="public bin config migrations src templates composer.json composer.lock symfony.lock .env etc"
for path in $pathsToCopy
do
cp -r ../../"$path" ./
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}

View file