ci: add mysqldump (jsrouting)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
c6e9a61f2a
commit
7f9f44d9af
|
@ -1,20 +1,25 @@
|
||||||
pipeline:
|
pipeline:
|
||||||
create_db:
|
create_db:
|
||||||
image: mariadb:10.3
|
image: mariadb:10.3
|
||||||
|
secrets: [mysqldump]
|
||||||
commands:
|
commands:
|
||||||
- sleep 20
|
- sleep 20
|
||||||
- mysql -hdb -uroot -proot -e "CREATE DATABASE app"
|
- mysql -hdb -uroot -proot -e "CREATE DATABASE app"
|
||||||
|
- eval "$MYSQLDUMP" | mysql -hdb -uroot -proot app
|
||||||
|
|
||||||
config:
|
config:
|
||||||
image: deblan/php:8.1
|
image: deblan/php:8.1
|
||||||
commands:
|
commands:
|
||||||
- echo APP_ENV=prod >> .env.local
|
- echo APP_ENV=prod >> .env.local
|
||||||
- echo APP_SECRET=$(openssl rand -hex 32) >> .env.local
|
- echo APP_SECRET=$(openssl rand -hex 32) >> .env.local
|
||||||
- echo DATABASE_URL=mysql://root:root@db/app >> .env.local
|
- echo DATABASE_URL=mysql://root:root@db/app >> .env.local
|
||||||
|
|
||||||
composer:
|
composer:
|
||||||
image: deblan/php:8.1
|
image: deblan/php:8.1
|
||||||
commands:
|
commands:
|
||||||
- apt-get update && apt-get -y install git
|
- apt-get update && apt-get -y install git
|
||||||
- composer install --no-scripts
|
- composer install --no-scripts
|
||||||
|
|
||||||
migrate:
|
migrate:
|
||||||
image: deblan/php:8.1
|
image: deblan/php:8.1
|
||||||
environment:
|
environment:
|
||||||
|
@ -25,6 +30,8 @@ pipeline:
|
||||||
image: deblan/php:8.1
|
image: deblan/php:8.1
|
||||||
commands:
|
commands:
|
||||||
- php bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
|
- php bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
|
||||||
|
- cat public/js/fos_js_routes.json
|
||||||
|
|
||||||
node:
|
node:
|
||||||
image: node:16-slim
|
image: node:16-slim
|
||||||
commands:
|
commands:
|
||||||
|
@ -48,7 +55,6 @@ pipeline:
|
||||||
- sed -i "s/ssh_user/$SSH_USER/g" .mage.yml
|
- sed -i "s/ssh_user/$SSH_USER/g" .mage.yml
|
||||||
- sed -i "s/ssh_host/$SSH_HOST/g" .mage.yml
|
- sed -i "s/ssh_host/$SSH_HOST/g" .mage.yml
|
||||||
- sed -i "s#app_directory#$APP_DIRECTORY#g" .mage.yml
|
- sed -i "s#app_directory#$APP_DIRECTORY#g" .mage.yml
|
||||||
- cat .mage.yml
|
|
||||||
# - /root/.config/composer/vendor/bin/mage
|
# - /root/.config/composer/vendor/bin/mage
|
||||||
# when:
|
# when:
|
||||||
# event: [deploy]
|
# event: [deploy]
|
||||||
|
|
Loading…
Reference in a new issue