forked from EncounterTheCross/EncounterTheCross
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.mage.yml
80 lines (80 loc) · 2.82 KB
/
.mage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
magephp:
# log_dir: ./tools/ReleaseManager/logs
# log_limit: 10
custom_tasks:
- 'App\Tools\MageTools\Task\Release\Zip\PrepareTask'
- 'App\Tools\MageTools\Task\Symfony\DatabaseBackUpTask'
- 'App\Tools\MageTools\Task\Symfony\PlatformReleaseTask'
- 'App\Tools\MageTools\Task\Yarn\BuildTask'
- 'App\Tools\MageTools\Task\Yarn\InstallTask'
environments:
release:
tar_create_path: tar
tar_extract_path: tar
user: avbapt
from: ./
releases: 4
host_path: /home3/avbapt/releases/production
exclude:
- ./var/cache/*
- ./var/log/*
- ./tools
- ./horizon-ui-chakra/*
- ./vendor/netgen/**/tests
hosts:
- 192.185.5.34:2222
# pre-deploy:
# on-deploy:
on-release:
- fs/copy: { from: '/home3/avbapt/releases/production/.env.local.php', to: '/home3/avbapt/releases/production/releases/%release%/.env.local.php' }
- fs/link:
from: '/home3/avbapt/releases/production/releases/%release%/public/bundles'
to: '/home3/avbapt/public_html/bundles'
flags: '-snf'
- fs/link:
from: '/home3/avbapt/releases/production/releases/%release%/public/build'
to: '/home3/avbapt/public_html/build'
flags: '-snf'
- exec: { cmd: '/home3/avbapt/releases/production/releases/%release%/bin/console doctrine:migrations:migrate --env=prod --no-interaction', desc: 'Run Doctrine Migrations if needed.'}
# post-deploy:
production:
# user: app
branch: main
from: ./
# host_path: /var/www/myapp
releases: 4
exclude:
- ./var/*
- ./horizon-ui-chakra/*
- ./tools/*
- '*.local*'
# hosts:
# Runs on Local
pre-deploy:
- fs/remove: {file: './public/bundles', flags: '-Rf'}
- fs/remove: {file: './public/build', flags: '-Rf'}
- fs/remove: {file: './vendor', flags: '-Rf'}
- composer/install: { flags: '--no-dev --no-scripts' }
- composer/dump-autoload
- yarn/install
- yarn/build: { buildType: 'build' }
- symfony/assets-install: { env: 'prod', target: 'public' }
- release/zip/prepare
# Runs on all Hosts
on-deploy:
# - symfony/cache-warmup: { env: 'dev' }
# - symfony/assets-install: { env: 'dev' }
# Runs on all Hosts
on-release:
# GH Release Commands here
# Runs on all Hosts
post-release:
# Runs on Local
post-deploy:
- fs/remove: { file: './public/bundles', flags: '-Rf' }
- fs/remove: { file: './public/build', flags: '-Rf' }
- fs/remove: { file: './vendor', flags: '-Rf' }
- composer/install: { flags: '--no-scripts' }
- yarn/install
- yarn/build
- symfony/assets-install: { env: 'dev', target: 'public' }