Skip to content

Commit

Permalink
add config sync guide
Browse files Browse the repository at this point in the history
  • Loading branch information
omohokcoj committed Dec 15, 2021
1 parent c2f6741 commit 6deb0af
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ docker compose up
* [Email alerts](#email-alerts)
* [Intelligence search](#intelligence-search)
* [Optimized for mobile](#optimized-for-mobile)
* [Configurations Sync](https://github.com/motor-admin/motor-admin/tree/master/guides/configurations_sync_between_environments.md)

## [Pro](https://www.getmotoradmin.com/pro)

Expand Down
21 changes: 21 additions & 0 deletions guides/configurations_sync_between_environments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Configurations Sync

All admin panel configurations are automatically stored in the `motor-admin.yml` file. It's recommended to include this file in the application git repository to always have the admin panel configurations in sync across different local and remote environments. Configurations from the `motor-admin.yml` file are loaded automatically each time the file changes via `git push` or `rsync`.

It's possible to sync local development admin panel configurations with remote production application via `rake motor:sync` task:

```bash
MOTOR_SYNC_REMOTE_URL=https://remote-app-url/ MOTOR_SYNC_API_KEY=secure-random-string ./motor-admin sync
```

### Docker

```bash
docker run -it -e MOTOR_SYNC_REMOTE_URL=https://remote-app-url/ -e MOTOR_SYNC_API_KEY=secure-random-string motoradmin/motoradmin:latest ./motor-admin sync
```

### Docker Compose

```bash
docker compose run app ./motor-admin sync
```

0 comments on commit 6deb0af

Please sign in to comment.