-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use sensible defaults so everything runs out of the box
Change the Django settings so the demo site runs without having to define any environment variables. Similarly change the docker-compose.yml file to provide sensible defaults so the images are built and the containers run without any additional configuration. The .env and .env.docker files are replaced by .env.example which contains all the environment variables used in the project. Now you only need to create .env when you want to change the way the project is configured, for example, running the database in a container when you also have PostgreSQL installed natively. As a result the getting started guide is simplified with the steps for adding PostgreSQL and RabbitMQ accounts are now options and are moved to the end of the guide.
- Loading branch information
1 parent
9e4cb8b
commit 4e83d6a
Showing
7 changed files
with
188 additions
and
135 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# | ||
# Environment variables used for running the demo site | ||
# | ||
# Django settings and docker-compose.yml are configured with sensible default | ||
# so whether you run the demo with a virtualenv or containers everything works | ||
# out of the box. You will only need to set environment variables if you want | ||
# to change the configuration in some way. For example, you have postgres | ||
# installed natively but you want to use a container instead. In this case you | ||
# need to set DOCKER_POSTGRES_PORT_FORWARD so the port does not clash with the | ||
# post used by the native postgres. | ||
|
||
# Configuration for PostgreSQL | ||
|
||
# Both POSTGRES_USER and POSTGRES_PASSWORD are required when building the | ||
# postgres image. Both are set to use the default value of 'postgres' in | ||
# docker-compose.yml. Override them here, along with any other configuration | ||
# changes you want. | ||
|
||
#POSTGRES_USER=postgres | ||
#POSTGRES_PASSWORD=postgres | ||
#POSTGRES_DB=postgres | ||
|
||
# This is the external port visible locally. POSTGRES_PORT is the port in | ||
# the docker virtual network. | ||
|
||
#DOCKER_POSTGRES_PORT_FORWARD=5432 | ||
|
||
# Configuration for RabbitMQ | ||
|
||
#RABBITMQ_DEFAULT_USER=guest | ||
#RABBITMQ_DEFAULT_PASS=guest | ||
#RABBITMQ_DEFAULT_VHOST= | ||
|
||
# Ports on the local network so the rabbitmq service and flower webserver | ||
# are accessible. | ||
|
||
#DOCKER_RABBITMQ_PORT_FORWARD=5672 | ||
#DOCKER_FLOWER_PORT_FORWARD=5555 | ||
|
||
# Configuration for Celery | ||
|
||
#CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:5672/ | ||
|
||
# Django-feeds settings | ||
|
||
# Crontab setting the schedule on which the Celery task, load_feeds, that | ||
# checks for Feeds to be loaded, runs. | ||
|
||
#FEEDS_TASK_SCHEDULE=0 * * * * | ||
|
||
# Crontab setting the default schedule a Feed is loaded on. This schedule | ||
# can be set on Feeds individually. This schedule must coincide with the | ||
# FEEDS_TASK_SCHEDULE otherwise no feed will be loaded. The Celery task | ||
# runs every hour on the hour however you can set the default schedule to | ||
# every hour on the hour between 8am and 8pm for example. That way you | ||
# can limit fetches to the times that new posts are more likely to be | ||
# published. | ||
|
||
#FEEDS_LOAD_SCHEDULE=0 * * * * | ||
|
||
# Extra. Accessing postgres on the command line. | ||
# | ||
# This is useful if you want to define Makefile targets for managing the | ||
# database. | ||
# | ||
# Set environment variables used by the postgresql commands, psql, createdb, | ||
# dropdb, etc. to connect to the database. PGPASSWORD is particularly useful | ||
# to avoid having to enter it for each command. You will need to configure | ||
# the server to allow username/password (md5) authentication on local (socket) | ||
# connections and so avoid having to su to the postgres user first. | ||
# | ||
# /etc/postgresql/<version>/main/pg_hba.conf | ||
# local all all md5 | ||
# | ||
# For more info on environment variables see, | ||
# https://www.postgresql.org/docs/current/libpq-envars.html | ||
# | ||
# The values must match the variables defined above, obviously. | ||
|
||
#PGUSER=postgres | ||
#PGPASSWORD=postgres | ||
#PGDATABASE=postgres | ||
|
||
# PGPORT must match DOCKER_POSTGRES_PORT_FORWARD | ||
|
||
#PGPORT=5432 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.