https://github.com/tabo-syu/bookmarks
https://github.com/tabo-syu/bookmarks
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tabo-syu/bookmarks
- Owner: tabo-syu
- Created: 2024-02-23T17:21:12.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-24T16:18:25.000Z (12 months ago)
- Last Synced: 2024-06-24T17:43:44.375Z (12 months ago)
- Language: Ruby
- Size: 130 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bookmarks
## Local Development
1. Install [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
2. Open as Dev Container```console
$ nvm install --lts$ bundle install
// Edit credentials
$ EDITOR="code --wait" bin/rails credentials:edit
# aws:
# access_key_id: 123
# secret_access_key: 345
discord:
token: xxxxx
channel_id: xxxxx# Used as the base secret for all MessageVerifiers in Rails, including the one protecting cookies.
secret_key_base: xxxxx// Run development server
$ rails s
```## Deploy
1. `docker compose build --no-cache`
1. `docker compose down`
1. `docker compose up -d`## Backup & Restore
Backup
```console
$ chmod +x backup.sh
$ crontab -e
0 2 * * * /path/to/your/project/backup.sh
```Restore
```console
$ docker run --rm -v bookmarks-rails_postgres-data:/volume -v $(pwd):/backup busybox tar xvf /backup/postgres-data_backup.tar -C /
```