-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.yaml
More file actions
112 lines (92 loc) · 2.21 KB
/
app.yaml
File metadata and controls
112 lines (92 loc) · 2.21 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
runtime: php84
env: standard
# Use router.php as the front controller
entrypoint: serve router.php
# Instance class - adjust based on your needs
instance_class: F1
# Automatic scaling configuration
automatic_scaling:
min_idle_instances: 0
max_idle_instances: 1
min_pending_latency: 30ms
max_pending_latency: automatic
max_concurrent_requests: 50
# Environment variables
env_variables:
# Set to production mode
APP_ENV: 'production'
APP_DEBUG: 'false'
# Fastway API Configuration
FASTWAY_API_KEY: 'API_KEY_HERE'
FASTWAY_API_BASE_URL: 'https://sa.api.fastway.org'
FASTWAY_API_VERSION: 'v3'
FASTWAY_RF_CODE: 'JNB'
# Handlers for static files and PHP routes
handlers:
# Static CSS files
- url: /assets/css
static_dir: assets/css
secure: always
expiration: 30d
http_headers:
Cache-Control: "public, max-age=2592000"
X-Content-Type-Options: "nosniff"
# Static JavaScript files
- url: /assets/js
static_dir: assets/js
secure: always
expiration: 30d
http_headers:
Cache-Control: "public, max-age=2592000"
X-Content-Type-Options: "nosniff"
# Static images
- url: /assets/images
static_dir: assets/images
secure: always
expiration: 365d
http_headers:
Cache-Control: "public, max-age=31536000"
# Favicon (if you add one)
- url: /favicon.ico
static_files: assets/images/favicon.ico
upload: assets/images/favicon.ico
secure: always
expiration: 30d
# API endpoints
- url: /api/.*
script: auto
secure: always
# Specific PHP files - IMPORTANT: These must come before the catch-all
- url: /track.php
script: auto
secure: always
- url: /quote.php
script: auto
secure: always
- url: /system-check.php
script: auto
secure: always
- url: /health-check.php
script: auto
secure: always
- url: /index.php
script: auto
secure: always
# Root URL - serve index.php
- url: /
script: auto
secure: always
# All other requests go to PHP (fallback)
- url: /.*
script: auto
secure: always
# Error handlers
error_handlers:
- file: error.html
error_code: over_quota
- file: error.html
error_code: timeout
# Security headers for all responses
default_expiration: "0s"
# Enable Cloud Build API for deployment
# Build configuration is handled automatically