File tree Expand file tree Collapse file tree 3 files changed +42
-17
lines changed Expand file tree Collapse file tree 3 files changed +42
-17
lines changed Original file line number Diff line number Diff line change 1+ # Add this below the storage folder initialization snippet
2+ FOLDER=/var/www/html/storage/database
3+ if [ ! -d " $FOLDER " ]; then
4+ echo " $FOLDER is not a directory, initializing database"
5+ mkdir /var/www/html/storage/database
6+ touch /var/www/html/storage/database/database.sqlite
7+ fi
Original file line number Diff line number Diff line change 1+ # See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/
2+
3+ name : Fly Deploy
4+ on :
5+ push :
6+ branches :
7+ - main
8+ jobs :
9+ deploy :
10+ name : Deploy app
11+ runs-on : ubuntu-latest
12+ concurrency : deploy-group # optional: ensure only one action runs at a time
13+ steps :
14+ - uses : actions/checkout@v4
15+ - uses : superfly/flyctl-actions/setup-flyctl@master
16+ - run : flyctl deploy --remote-only
17+ env :
18+ FLY_API_TOKEN : ${{ secrets.FLY_API_TOKEN }}
Original file line number Diff line number Diff line change 1- # fly.toml app configuration file generated for keza-starter-kit on 2024-10-16T00:42:10 +02:00
1+ # fly.toml app configuration file generated for keza-starter-kit on 2024-10-20T17:07:58 +02:00
22#
33# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
44#
@@ -12,44 +12,44 @@ console_command = 'php /var/www/html/artisan tinker'
1212 NODE_VERSION = ' 18'
1313 PHP_VERSION = ' 8.2'
1414
15+ [deploy ]
16+ strategy = ' bluegreen'
17+
1518[env ]
1619 APP_ENV = ' production'
20+ DB_CONNECTION = ' sqlite'
21+ DB_DATABASE = ' /var/www/html/storage/database/database.sqlite'
1722 LOG_CHANNEL = ' stderr'
1823 LOG_LEVEL = ' info'
1924 LOG_STDERR_FORMATTER = ' Monolog\Formatter\JsonFormatter'
2025 SESSION_DRIVER = ' cookie'
2126 SESSION_SECURE_COOKIE = ' true'
2227 SSR_URL = ' ssr.process.keza-starter-kit.internal:13714'
23- DB_CONNECTION =" sqlite"
24- DB_DATABASE =" /var/www/html/storage/database/database.sqlite"
2528
2629[processes ]
2730 app = ' '
2831 ssr = ' php /var/www/html/artisan inertia:start-ssr'
2932
33+ [[mounts ]]
34+ source = ' storage_dir'
35+ destination = ' /var/www/html/storage'
36+
3037[http_service ]
3138 internal_port = 8080
3239 force_https = true
33- auto_stop_machines = true
40+ auto_stop_machines = ' stop '
3441 auto_start_machines = true
3542 min_machines_running = 0
3643 processes = [' app' ]
3744
38- [[http_service .checks ]]
39- grace_period = " 10s "
40- interval = " 30s "
41- method = " GET "
42- timeout = " 5s "
43- path = " / "
45+ [[http_service .checks ]]
46+ interval = ' 30s '
47+ timeout = ' 5s '
48+ grace_period = ' 10s '
49+ method = ' GET '
50+ path = ' / '
4451
4552[[vm ]]
4653 memory = ' 512mb'
4754 cpu_kind = ' shared'
4855 cpus = 1
49-
50- [mounts ]
51- source =" storage_dir"
52- destination =" /var/www/html/storage"
53-
54- [deploy ]
55- strategy = " bluegreen"
You can’t perform that action at this time.
0 commit comments