Skip to content

Commit

Permalink
add upgrade infos
Browse files Browse the repository at this point in the history
  • Loading branch information
rwaffen committed Jan 31, 2023
1 parent e83725a commit 9ae6ae8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,32 @@ Any changes made to files from a git repository will be commited and pushed back
to the origin repository. Please note that HDM will not pull updates from the
origin repository and is **not** able to resolve possible conflicts, so you might
want to make sure that your repository is only edited by HDM.

## :warning: Update to >= 1.0.0

### Set rails secret

Don't forget to set SECRET_KEY_BASE env var in docker run, docker-compose, systemd or hieradata.

```
openssl rand -hex 16
9dea7603c008dec285e4b231602a00b2

SECRET_KEY_BASE="9dea7603c008dec285e4b231602a00b2"


docker run -it --rm -p 3000:3000 -e DEVELOP=1 -e SECRET_KEY_BASE=9dea7603c008dec285e4b231602a00b2 ghcr.io/betadots/hdm:development
```
See [`docker-compose.yaml`](docker-compose.yaml).
### Update db file
Move existing db/development.sqlite3 to db/production.sqlite3
```bash
docker exec -it <container_id> bash
mv db/development.sqlite3 db/production.sqlite3
bin/rails db:environment:set RAILS_ENV=production
```
1 change: 1 addition & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ services:
container_name: hdm
environment:
- TZ=Europe/Berlin
- SECRET_KEY_BASE="a_l0ng_c0mpl3x_strinG" # f.e.: openssl rand -hex 16
# whether to enable dev mode with fake puppetdb or not
# - DEVELOP=1
# volumes:
Expand Down

0 comments on commit 9ae6ae8

Please sign in to comment.