-
-
Notifications
You must be signed in to change notification settings - Fork 112
Setup
- Fork the
ofn-infra
repository. - Clone the forked copy:
git clone https://github.com/<your account>/ofn-infra.git
Host configuration is divided into group_vars
and host_vars
. A group stores all the configuration that is common to all servers in that group. For OFN they are typically based on the country.
- checkout_zone: See the Spree User Guide for more.
- country_code: See the list of 2-letter country codes
- currency: See the list of currency codes
- locale: See the list of locales supported by Spree.
- language: Use the locale and add
.UTF8
. Locale should be formatted asen_GB
. - language_packages:
- l10n_repo: Create a
l10n_xx
localization project (see Seed data below) - timezone: Run
bundle exec rake time:zones:all
to find an appropriate timezone value.
If you're not familiar with YAML, read more at the official YAML site. You can validate the syntax of your vars file with the Online YAML Parser.
OFN is installed with Australia's states by default. The Open Food Foundation collects more localisation data repositories of other countries. They follow the name scheme l10n_<country-code>
like l10n_gb or l10n_fr.
If you are the first to run an OFN app for a country, you have to create a repository with that data first. It should contain a file called states.yml.
Publish that repository somewhere accessible for your server. The Open Food Foundation will be happy to put your repository amongst the others. Then change the l10n_repo
variable in your vars file to match your repository.
For production and staging environments, you will need SSL certificates for the domain name. (The domain name is specified in the inventory/hosts
file.)
- Obtain a certificate from a provider. We recommend Let's Encrypt.
- Create two text files:
ssl.crt
andssl.key
. - In
ssl.crt
add the content of the certificate and chain bundle. - In
ssl.key
add the content of the private key.
Note: the formatting of these text blocks must be that there are no spaces other than in the start/end lines and each line is 64 characters long.
- Put these in the
files
folder.
Note: This currently only supports configuring one server at a time.
Provisioning
Deployment
Sysadmin
External services
- Sending emails from OFN
- Email Deliverability
- SSL certificates
- Google Maps
- File storage
- Backups
- Server monitoring
- Issue reporting (Bugsnag)
Contributing