-
-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy pathsample.env
91 lines (73 loc) · 4.27 KB
/
sample.env
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
# Copy this file to .env docker-compose will read and use the values from here.
# The build.py script is also aware of this file and if you run `poetry self add
# poetry-dotenv-plugin` when you run `poetry shell` it will also pick up these
# variables and add them to your environment. Note: once an environment variable is exported to
# your environment, modifying the value of that variable in the .env file will have no effect.
# You can use the ``unset`` command in bash or ``set -e`` in fish.
# This will ensure that the postgresql database defined in the docker-compose.yml file is started
# to run your own, comment out or change the line below. (see pgbouncer or nginx_dstart_dev)
# available profiles include:
# basic - adds the db service to the composed app
# production - adds pgbouncer
# dev - adds the nginx_dstart_dev service
# author - adds the author and worker services
# multiple profiles can be enabled using a comma separated list e.g. basic,author
COMPOSE_PROFILES=basic
# The path to runestone books (on the host) In the container is set to /books
# Please Note that the dotenv package does not expand tilde to your home directory!
# !!EDITME!!
BOOK_PATH=/path/to/Runestone/books
# Where is the runestone app located (inside the container)
RUNESTONE_PATH = /usr/local/lib/python3.10/site-packages/rsptx/web2py_server/applications/runestone
# Database URLs: You may want to have a couple of different environment
# variables set up that essentially point to the same database. Therefore we use
# one set of variables for use within docker, prefixed with DC_ and another pair
# for use outside of docker. The DC variants should only be set in this file for
# use with docker-compose. (If you don't set the DC_ variables, docker compose
# will fall back to the other pair.)
DBURL = postgresql://runestone:runestone@localhost/runestone
DC_DBURL = postgresql://runestone:[email protected]/runestone
DEV_DBURL = postgresql://runestone:runestone@localhost:2345/runestone_dev
DC_DEV_DBURL = postgresql://runestone:runestone@db/runestone_dev
# Needed for pgbouncer
# set these for use with pgbouncer in docker, mostly for production w/load balancer
# but needed so that pgbouncer startup does not fail.
POSTGRESQL_HOST=db # or host.docker.internal or whatever
POSTGRESQL_DATABASE=runestone_dev
PGBOUNCER_DATABASE=runestone_dev
# These should be set to the username and password for the runestone user in the database
# These are also used by the db service to create a user for the dockerized postgresql
POSTGRESQL_USERNAME=runestone
POSTGRESQL_PASSWORD=runestone
# If you use pgbouncer then you will need to adjust your ``DC_DEV_DBURL`` and/or ``DC_DBURL`` to connect to pgbouncer not the database.
# DC_DEV_DBURL=postgresql://${POSTGRESQL_USERNAME}:${POSTGRESQL_PASSWORD}@pgbouncer:6432/${PGBOUNCER_DATABASE}
# for single configurations it is fine to use the redis configured in docker-compose
# however, for load balanced configurations you want to run a redis server that is
# shared by all the workers.
REDIS_HOST = redis
# Server configuration (production, development, or test)
# You should not set these to test as that is for our testing framework, not for
# people who are just testing out Runestone.
SERVER_CONFIG=development
WEB2PY_CONFIG=development
## !! change these if running a real server !!
# This replaces the private/auth.key file for web2py
WEB2PY_PRIVATE_KEY = sha512:24c4e0f1-df85-44cf-87b9-67fc714f5653
# This is the secret key for the javascript web token
JWT_SECRET = supersecret
# Set up host names
# localhost is ok for development, but you should set this to the real hostname
# if running a remote development server or definitely for production
RUNESTONE_HOST = localhost
# for production where you run a front end load balancer
# LOAD_BALANCER_HOST = localhost
# If you want nginx to install a certificate
# CERTBOT_EMAIL = [email protected]
# For setting production (or development) runtime parameters
# any UVICORN options can be set as an environment variable using the UVICORN_ prefix
# for gunicorn we can add additional runtime parameters with the GUNICORN_CMD_ARGS variable
# for uvicorn in production recommend 2 * cores + 1
UVICORN_WORKERS=5
GUNICORN_CMD_ARGS="--workers=3 --log-level 'debug'"
# Set the log level - for production set this to info or higher
LOG_LEVEL=DEBUG