mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-21 20:39:36 +02:00
SECRET is mandatory and .env should not be inside container (#2)
This commit is contained in:
parent
acf7f56e15
commit
6f624696ba
3 changed files with 9 additions and 1 deletions
|
@ -7,6 +7,7 @@ data
|
||||||
.dev
|
.dev
|
||||||
.docker
|
.docker
|
||||||
.dockerignore
|
.dockerignore
|
||||||
|
.env
|
||||||
.git
|
.git
|
||||||
.gitignore
|
.gitignore
|
||||||
.prettierignore
|
.prettierignore
|
||||||
|
|
|
@ -33,9 +33,11 @@ docker pull pawelmalak/flame:2.0.0
|
||||||
|
|
||||||
#### Deployment
|
#### Deployment
|
||||||
|
|
||||||
|
You have to generate a 64 random string
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# run container
|
# run container
|
||||||
docker run -p 5005:5005 -v /path/to/data:/app/data -e PASSWORD=flame_password pawelmalak/flame
|
docker run -p 5005:5005 -v /path/to/data:/app/data -e PASSWORD=flame_password SECRET=yourRandom64String pawelmalak/flame
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Building images
|
#### Building images
|
||||||
|
@ -71,6 +73,7 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- PASSWORD=flame_password
|
- PASSWORD=flame_password
|
||||||
- PASSWORD_FILE=/run/secrets/password # optional but required for (1)
|
- PASSWORD_FILE=/run/secrets/password # optional but required for (1)
|
||||||
|
- SECRET=yourRandom64String
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
# optional but required for Docker secrets (1)
|
# optional but required for Docker secrets (1)
|
||||||
|
|
|
@ -4,6 +4,10 @@ const initDockerSecrets = require('./initDockerSecrets');
|
||||||
const normalizeTheme = require('./normalizeTheme');
|
const normalizeTheme = require('./normalizeTheme');
|
||||||
|
|
||||||
const initApp = async () => {
|
const initApp = async () => {
|
||||||
|
if (!process.env.SECRET) {
|
||||||
|
console.error('ERROR: SECRET key is missing in environment variables');
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
initDockerSecrets();
|
initDockerSecrets();
|
||||||
await initFiles();
|
await initFiles();
|
||||||
await initConfig();
|
await initConfig();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue