https://github.com/zenflow/echoenglishschool.com
https://github.com/zenflow/echoenglishschool.com
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/zenflow/echoenglishschool.com
- Owner: zenflow
- License: mit
- Created: 2021-11-23T23:24:23.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-10-17T04:02:50.000Z (over 3 years ago)
- Last Synced: 2025-02-13T15:55:03.572Z (over 1 year ago)
- Language: JavaScript
- Size: 40.4 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# echoenglishschool.com
> Powered by [Apostrophe CMS v3](https://v3.docs.apostrophecms.org/)
> Forked from [apos-my-site boilerplate](https://github.com/zenflow/apos-my-site)
## Development
### Prerequisites
1. Git
2. [Node.js](https://nodejs.org/en/) v14 or later
3. [MongoDB Community Server](https://docs.mongodb.com/manual/administration/install-community/) v5 or later
4. (Optional) [Docker](https://docs.docker.com/get-docker/) (for testing production Docker image)
### Setup
1. Fork this repo on GitHub
2. Clone your fork onto your local machine (`git clone https://github.com/ node scripts/restore-db`
2. Uploads. Copy files from `public/uploads` into the volume.
4. Start the container
5. If you skipped the "Restore app data" step, log in with username "admin" password "admin" and edit this user.
## Automated backups of production
This project has a GitHub Actions workflow that can be used to back up production data **on a schedule** and **on-demand**.
It will back up both the database and the uploaded files.
It uses the GitHub repo as storage, so you can easily work with production data in your development environment.
Backups go into the `backup/prod` branch to be manually merged with the `main` branch as desired.
When merging it is recommended to **Squash and merge** to keep the Git commit history clean.
To set up:
1. (Optional) Enable scheduled backups by un-commenting the two lines near the top of `.github/workflows/back-up-prod.yml`.
2. Create a branch named `backup/prod` and push it to GitHub.
3. Add repository secrets on GitHub under Settings > Secrets > New repository secret:
1. `MONGODB_URI` - e.g. `mongodb://username:password@example.com:27017/databasename?authSource=admin`
2. `UPLOADS_DIR` - e.g. `username:password@example.com:/path/to/public/uploads` (username and password are for SSH)
To trigger a backup on-demand, go to your project "Actions", select "Back up prod" from the list of workflows,
click the "Run workflow" dropdown, and click the "Run workflow" button.