Skip to content

Commit

Permalink
update docummentation
Browse files Browse the repository at this point in the history
  • Loading branch information
celuchmarek committed Oct 22, 2024
1 parent f180a63 commit 9752100
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 8 deletions.
35 changes: 27 additions & 8 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,8 +1,27 @@
AVM_MICROSERVICE_HOST=localhost:7200
FIREBASE_CREDENTIALS=
FIREBASE_PROJECT_ID=
ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY=
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=
RAILS_LOG_LEVEL=
ROOT_URL_REDIRECT=
# ---- required in all environments ----
ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY=wdquAMgEOvYATXZzH2qWYhAT-d33R5s9NBaT3u0NTuE # random base64 encoded 32 bytes (should result in 44 characters)
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=uY3Dcm4RmTeSaILJZvD3Bk34zB7FttZLDwIMoM3YutE # random base64 encoded 32 bytes (should result in 44 characters)
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=Gsx8gdeRzLlWS6qWnpPglEIDI_mn2t4tyUkoeChZ7Ho # random base64 encoded 32 bytes (should result in 44 characters)
AVM_MICROSERVICE_HOST=localhost:7200 # host of the AVM service


# ---- required in produciton environment ----
DATABASE_URL=postgres://avm_server:password@pg-host:5432/avm_server_production
SECRET_KEY_BASE=be48dd3219138cc04cbdb48fb5324a4fb1a043c3db892ecf00087d895b97ea21bc5a64fddaa3835373cf2d3d62d8c4546a0359b68f6cc42278a5cc64bdfa9a5a # random 64 bytes in hex


# ---- rails app envs ----
RAILS_ENV=development # development, test, production
RAILS_LOG_LEVEL=info # error, warn, info
RAILS_LOG_TO_STDOUT=true # true, false - defaults to false in production; recommended to set to true for containered deployments


# ---- optional ----
APPLE_APP_SITE_ASSOCIATION=e30= # Base64 encoded content of Apple's /.well-known/apple-app-site-associaton file
ANDROID_ASSTELINKS=e30= # Base64 encoded contant of Andorid's /.well-known/assetlink.json file

FIREBASE_CREDENTIALS= # needed for Firebase Cloud Messaging - notifications
FIREBASE_PROJECT_ID= # needed for Firebase Cloud Messaging - notifications

ROOT_URL_REDIRECT=https://example.com/ # where to redirect root path request "/"
QR_CODE_URL_REDIRECT=https://example.com/ # where to redirect "/qr-code" request
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Projekt sa skladá z viacerých častí:

## Ako si to rozbehnúť

### Development prostredie

- Je potrebné si nainštalovať správnu verziu Ruby. To sa najlepšie robí cez [RVM](https://rvm.io/) alebo [Rbenv](https://github.com/rbenv/rbenv).
- Aplikácia vyžaduje PostgreSQL databázu.
- Skopírovať `.env.sample` do `.env` a nastaviť hodnoty.
Expand All @@ -28,6 +30,17 @@ bundle exec rails db:setup
bundle esec rails s
```

### Produkčné nasadenie v kontajneri

- Je potrebné si vybuildiť Docker image na základe poskytnutého Dockerfile.
- Volume pre šifrované ukladanie podpisovaných súborov v `/app/storage`
- Premenné prosredia sú bližšie popísané v `.env.sample`, pričom tieto sú nevyhnutné pre produkčné nasadenie:
- PostgreSQL a connection string v `DATABASE_URL`
- Adresa [AVM Service](https://github.com/slovensko-digital/avm-service) inštnacie v `AVM_MICROSERVICE_HOST`
- Nastavené ENVs `ACTIVE_RECORD_ENCRYPTION_*`
- Nastavený ENV `SECRET_KEY_BASE`
- Nastavený ENV `RAILS_ENV=production`


## Architektúra riešenia

Expand Down

0 comments on commit 9752100

Please sign in to comment.