Reputation: 597
I can't figure out how to setup app.yaml for codeigniter 3 with php 7.3 gcp. Every useful link is about php55.. thanks in advance.
runtime: php73 # Replace with php73 to use the PHP 7.3 runtime
handlers:
# Serve a directory as a static resource.
- url: /stylesheets
static_dir: stylesheets
# Serve images as static resources.
- url: /(.+\.(gif|png|jpg))$
static_files: \1
upload: .+\.(gif|png|jpg)$
# Serve your app through a front controller at index.php or public/index.php.
- url: .*
script: auto
This is what I got from gcp docs. It works but css and js are not working. Everything is in assets folder.
Upvotes: 0
Views: 338
Reputation: 39824
You don't have matching handler rules for css and js files, they'll only match the - url: .*
rule, which isn't suitable (script
handlers are designed for php scripts only).
You need to add rules for them, above the - url: .*
one, maybe something along these lines (adjust for your app's particular needs):
# Serve css and js files as static resources.
- url: /(.+\.(css|js))$
static_files: assets/\1
upload: assets/.+\.(css|js)$
Upvotes: 1