diff --git a/README.md b/README.md index 026f1a1d..a8c6de7a 100644 --- a/README.md +++ b/README.md @@ -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 bash +mv db/development.sqlite3 db/production.sqlite3 +bin/rails db:environment:set RAILS_ENV=production +``` diff --git a/docker-compose.yaml b/docker-compose.yaml index dc915d11..cf540fd8 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -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: