ci: env
This commit is contained in:
parent
7f9f44d9af
commit
7b1de57441
125
.woodpecker.yml
125
.woodpecker.yml
|
@ -1,66 +1,71 @@
|
||||||
pipeline:
|
pipeline:
|
||||||
create_db:
|
# create_db:
|
||||||
image: mariadb:10.3
|
# image: mariadb:10.3
|
||||||
secrets: [mysqldump]
|
# 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
|
# - eval "$MYSQLDUMP" | mysql -hdb -uroot -proot app
|
||||||
|
|
||||||
config:
|
test:
|
||||||
image: deblan/php:8.1
|
image: deblan/php:8.1
|
||||||
commands:
|
commands:
|
||||||
- echo APP_ENV=prod >> .env.local
|
- env
|
||||||
- echo APP_SECRET=$(openssl rand -hex 32) >> .env.local
|
|
||||||
- echo DATABASE_URL=mysql://root:root@db/app >> .env.local
|
|
||||||
|
|
||||||
composer:
|
# config:
|
||||||
image: deblan/php:8.1
|
# image: deblan/php:8.1
|
||||||
commands:
|
# commands:
|
||||||
- apt-get update && apt-get -y install git
|
# - echo APP_ENV=prod >> .env.local
|
||||||
- composer install --no-scripts
|
# - echo APP_SECRET=$(openssl rand -hex 32) >> .env.local
|
||||||
|
# - echo DATABASE_URL=mysql://root:root@db/app >> .env.local
|
||||||
|
#
|
||||||
|
# composer:
|
||||||
|
# image: deblan/php:8.1
|
||||||
|
# commands:
|
||||||
|
# - apt-get update && apt-get -y install git
|
||||||
|
# - composer install --no-scripts
|
||||||
|
#
|
||||||
|
# migrate:
|
||||||
|
# image: deblan/php:8.1
|
||||||
|
# environment:
|
||||||
|
# - PHP=php
|
||||||
|
# commands:
|
||||||
|
# - ./bin/doctrine-migrate
|
||||||
|
# jsroutes:
|
||||||
|
# image: deblan/php:8.1
|
||||||
|
# commands:
|
||||||
|
# - php bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
|
||||||
|
# - cat public/js/fos_js_routes.json
|
||||||
|
#
|
||||||
|
# node:
|
||||||
|
# image: node:16-slim
|
||||||
|
# commands:
|
||||||
|
# - npm install -g svg2ttf ttf2eot ttf2woff2
|
||||||
|
# - svg2ttf assets/fonts/deblan/src/deblan-icon.svg assets/fonts/deblan/deblan-icon.ttf
|
||||||
|
# - cat assets/fonts/deblan/deblan-icon.ttf | ttf2woff2 > assets/fonts/deblan/deblan-icon.woff2
|
||||||
|
# - ttf2eot assets/fonts/deblan/deblan-icon.ttf assets/fonts/deblan/deblan-icon.eot
|
||||||
|
# - yarn
|
||||||
|
# - npm run build
|
||||||
|
#
|
||||||
|
# deploy_prod:
|
||||||
|
# image: deblan/php:8.1
|
||||||
|
# secrets: [ssh_user, ssh_host, ssh_priv_key, app_directory]
|
||||||
|
# commands:
|
||||||
|
# - mkdir "$HOME/.ssh"
|
||||||
|
# - echo "$SSH_PRIV_KEY" > "$HOME/.ssh/id_ed25519"
|
||||||
|
# - chmod 700 "$HOME/.ssh"
|
||||||
|
# - chmod 600 "$HOME/.ssh/id_ed25519"
|
||||||
|
# - composer global require andres-montanez/magallanes
|
||||||
|
# - cp .mage.yml.dist .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#app_directory#$APP_DIRECTORY#g" .mage.yml
|
||||||
|
# # - /root/.config/composer/vendor/bin/mage deploy
|
||||||
|
# when:
|
||||||
|
# event: [deploy]
|
||||||
|
|
||||||
migrate:
|
# services:
|
||||||
image: deblan/php:8.1
|
# db:
|
||||||
environment:
|
# image: mariadb:10.3
|
||||||
- PHP=php
|
# environment:
|
||||||
commands:
|
# - MARIADB_ROOT_PASSWORD=root
|
||||||
- ./bin/doctrine-migrate
|
|
||||||
jsroutes:
|
|
||||||
image: deblan/php:8.1
|
|
||||||
commands:
|
|
||||||
- php bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
|
|
||||||
- cat public/js/fos_js_routes.json
|
|
||||||
|
|
||||||
node:
|
|
||||||
image: node:16-slim
|
|
||||||
commands:
|
|
||||||
- npm install -g svg2ttf ttf2eot ttf2woff2
|
|
||||||
- svg2ttf assets/fonts/deblan/src/deblan-icon.svg assets/fonts/deblan/deblan-icon.ttf
|
|
||||||
- cat assets/fonts/deblan/deblan-icon.ttf | ttf2woff2 > assets/fonts/deblan/deblan-icon.woff2
|
|
||||||
- ttf2eot assets/fonts/deblan/deblan-icon.ttf assets/fonts/deblan/deblan-icon.eot
|
|
||||||
- yarn
|
|
||||||
- npm run build
|
|
||||||
|
|
||||||
deploy_prod:
|
|
||||||
image: deblan/php:8.1
|
|
||||||
secrets: [ssh_user, ssh_host, ssh_priv_key, app_directory]
|
|
||||||
commands:
|
|
||||||
- mkdir "$HOME/.ssh"
|
|
||||||
- echo "$SSH_PRIV_KEY" > "$HOME/.ssh/id_ed25519"
|
|
||||||
- chmod 700 "$HOME/.ssh"
|
|
||||||
- chmod 600 "$HOME/.ssh/id_ed25519"
|
|
||||||
- composer global require andres-montanez/magallanes
|
|
||||||
- cp .mage.yml.dist .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#app_directory#$APP_DIRECTORY#g" .mage.yml
|
|
||||||
# - /root/.config/composer/vendor/bin/mage
|
|
||||||
# when:
|
|
||||||
# event: [deploy]
|
|
||||||
|
|
||||||
services:
|
|
||||||
db:
|
|
||||||
image: mariadb:10.3
|
|
||||||
environment:
|
|
||||||
- MARIADB_ROOT_PASSWORD=root
|
|
||||||
|
|
Loading…
Reference in a new issue