|
3 | 3 | ## Example for <dbname>
|
4 | 4 |
|
5 | 5 | 1. Create Database
|
6 |
| - 1. look through the sql file for issues and do test upload to local database |
7 |
| - 2. mysql -u<master> -p<master_password> -e "create database <dbname>;" |
8 |
| - 3. mysql -u<master> -p<master_password> <dbname> < <dbname>.sql |
9 |
| - 4. may need to run `grant all privileges on eurl.* to <master_password>@'%';` if |
10 |
| - master doesn't have access `flush privileges;` |
11 |
| -2. DNS Registtration: |
| 6 | + 1. Review the SQL file before importing to the production server. Test the import locally before uploading to a production instance. |
| 7 | + 2. Ensure the new database has the same name as the subdomain the user wishes to use, remembering that underscores (`_`) are replaced with dashes (`-`) for the URL. |
| 8 | + 2. Create the database: |
| 9 | + ```sql |
| 10 | + mariadb -u<master> -p<master_password> -e "CREATE DATABASE <dbname>;" |
| 11 | + ``` |
| 12 | + 3. Upload and restore the existing database: |
| 13 | + ``` |
| 14 | + mariadb -u<master> -p<master_password> <dbname> < <dbname>.sql |
| 15 | + ``` |
| 16 | + 4. **Note:** You may `GRANT ALL PRIVILEGES ON <dbname>.* TO <master_password>@'%';` if |
| 17 | + master doesn't have access `FLUSH PRIVILEGES;` |
| 18 | +2. DNS Registration: |
12 | 19 | 1. Login to Dreamhost, select Websites -> Manage Websites
|
13 |
| - 2. For specifycloud.org, select DNS ([Direct link](https://panel.dreamhost.com/index.cgi?tree=domain.dashboard#/site/specifycloud.org/dns)) |
| 20 | + 2. For `specifycloud.org`, select DNS ([Direct link](https://panel.dreamhost.com/index.cgi?tree=domain.dashboard#/site/specifycloud.org/dns)) |
14 | 21 | 3. Add CNAME record that has a name matching the database name and links to the appropraite regional domain value (i.e. `na-specify7-1.specifycloud.org.`, `eu-specify7-1.specifycloud.org.`, etc.). If the database name has underscores (_), replace these with dashes (-).
|
15 | 22 | - `<dbname>` points to `<subdomain>.specifycloud.org.`
|
16 | 23 | For example, database name `herb_rbge` would have the name `herb-rbge.specifycloud.org`.
|
|
35 | 42 | docker exec -it specifycloud-nginx-1 nginx -s reload
|
36 | 43 | ```
|
37 | 44 | 1. For automatic nginx reloading on certificate renewal create /etc/letsencrypt/renewal-hooks/post/reload-nginx.sh `#!/bin/bash docker exec -it specifycloud_nginx_1 nginx -s reload`
|
38 |
| - 2. `crontab -e;` and then add the line "0 3 * * 0,2,4,6 docker exec specifycloud_nginx_1 nginx -s reload" |
| 45 | + 2. `crontab -e;` and then add the line `0 3 * * 0,2,4,6 docker exec specifycloud_nginx_1 nginx -s reload` |
39 | 46 | 3. `crontab -l` to list cronjobs
|
40 | 47 | 5. Add Specify Admin user credentials to the Bitwarden Vault
|
41 | 48 | 7. Asset Server
|
|
0 commit comments