-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.yaml
35 lines (28 loc) · 1.51 KB
/
app.yaml
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
runtime: python
# the PROJECT-DIRECTORY is the one with settings.py and wsgi.py
entrypoint: gunicorn -b :$PORT anuncios2.wsgi # specific to a GUnicorn HTTP server deployment
env: flex # for Google Cloud Flexible App Engine
# any environment variables you want to pass to your application.
# accessible through os.environ['VARIABLE_NAME']
env_variables:
# the secret key used for the Django app (from PROJECT-DIRECTORY/settings.py)
SECRET_KEY: 'DJANGO-SECRET-KEY'
DEBUG: 'False' # always False for deployment
# everything after /cloudsql/ can be found by entering >> gcloud sql instances describe DATABASE-NAME << in your Terminal
# the DATABASE-NAME is the name you gave your project's PostgreSQL database
# the second line from the describe output called connectionName can be copied and pasted after /cloudsql/
# DB_HOST: '/cloudsql/PROJECT-ID:COMPUTE-ENGINE-ZONE:DATABASE-NAME'
# DB_PORT: '5432' # PostgreSQL port
# DB_NAME: 'DATABASE-NAME'
# DB_USER: 'DATABASE-USERNAME' # either 'postgres' (default) or one you created on the PostgreSQL instance page
# DB_PASSWORD: 'DATABASE-PASSWORD'
#
# STATIC_URL: 'https://storage.googleapis.com/BUCKET-NAME/static/' # this is the url that you sync static files to
handlers:
- url: /static
static_dir: allstaticfiles
beta_settings:
# from command >> gcloud sql instances describe DATABASE-NAME <<
# cloud_sql_instances: PROJECT-ID:COMPUTE-ENGINE-ZONE:DATABASE-NAME
runtime_config:
python_version: 3 # enter your Python version BASE ONLY here. Enter 2 for 2.7.9 or 3 for 3.6.4