-
Notifications
You must be signed in to change notification settings - Fork 110
www.data.gov
www.data.gov (a.k.a "www") is the front page of Data.gov. It contains content featuring federal datasets by topic and an Open Data blog, among other things. The audience is Open Data users in the public and in government.
Instance | URL |
---|---|
Production | www.data.gov |
This should no longer be necessary on static sites
Occasionally we need data for development (run before running DB migration as immediate backup, for instance). These commands are run from one of the wordpress-web hosts.
First, set the database credentials from the application in your shell.
$ source /var/www/datagov/current/.env
Then, create a compressed archive (you may need to add the --add-drop-table
flag to the mysqldump command).
$ mysqldump -h $DB_HOST -u $DB_USER -p $DB_NAME | gzip > $(date +%Y-%m-%d)-staging-wordpress.sql.gz
Supply the content of $DB_PASSWORD
when prompted (see .env file). You can use scp
to retrieve the file.
If you need to restore this database backup, simply run the following 2 commands (in a tmux session, as it may take a while)
$ tar -zxvf $(date +%Y-%m-%d)-staging-wordpress.sql.gz
$ mysql -h $DB_HOST -u $DB_USER -p $DB_NAME < $(date +%Y-%m-%d)-staging-wordpress.sql
You should remove these files if they are stale, so as not to waste space on the machine (FCS maintains regular backups)
The netscaler configuration verifies that sites are working and directs traffic only to working machines. To check that the server is responding appropriately, Netscaler checks with request HEAD https://{host_name}/wp-json
endpoint, expecting a 200
response code, to verify it is working as expected. Latest health check configuration.
A cache is created via CloudFront for the entire website to ensure traffic is served quickly and efficiently. The cache may need to be cleared from time to time for various reasons (ie the front page was updated)
If the database needs to be rebuilt, make sure a failing deploy has run to have the latest credentials.
Once the credentials are in place, run the db initialization steps (only automated for local). Modify these for the given environment, passwords, usernames, emails, etc.