-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix migration and add pregenerated SSL as optional
- Loading branch information
Showing
5 changed files
with
42 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,7 +91,7 @@ puma -C app/config/puma.rb | |
Pull the latest image: | ||
|
||
```bash | ||
docker pull chrisvel/tududi:0.15 | ||
docker pull chrisvel/tududi:0.16 | ||
``` | ||
|
||
In order to start the docker container you need 3 enviromental variables: | ||
|
@@ -100,24 +100,27 @@ In order to start the docker container you need 3 enviromental variables: | |
TUDUDI_USER_EMAIL | ||
TUDUDI_USER_PASSWORD | ||
TUDUDI_SESSION_SECRET | ||
TUDUDI_INTERNAL_SSL_ENABLED | ||
``` | ||
|
||
**PLEASE NOTE:** I am generating a new SSL certificate inside the Dockerfile. There will be an option to create and link an externally generated one in the future - at this stage I am doing this for simplicity. | ||
|
||
1. Create a random session secret and copy the hash to use it as a `TUDUDI_SESSION_SECRET`: | ||
1. (optional) Create a random session secret and copy the hash to use it as a `TUDUDI_SESSION_SECRET`: | ||
```bash | ||
openssl rand -hex 64 | ||
``` | ||
You will also have to set `TUDUDI_INTERNAL_SSL_ENABLED=true` in the docker command below. | ||
|
||
2. Run the docker command with your produced hash at the previous step: | ||
```bash | ||
docker run \ | ||
-e [email protected] \ | ||
-e TUDUDI_USER_PASSWORD=mysecurepassword \ | ||
-e TUDUDI_SESSION_SECRET=3337c138d17ac7acefa412e5db0d7ef6540905b198cc28c5bf0d11e48807a71bdfe48d82ed0a0a6eb667c937cbdd1db3e1e6073b3148bff37f73cc6398a39671 \ | ||
-e TUDUDI_INTERNAL_SSL_ENABLED=false \ | ||
-v ~/tududi_db:/usr/src/app/tududi_db \ | ||
-p 9292:9292 \ | ||
-d chrisvel/tududi:0.15 | ||
-d chrisvel/tududi:0.16 | ||
``` | ||
|
||
3. Navigate to https://localhost:9292 and fill in your email and password. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
ssl_bind '0.0.0.0', '9292', { | ||
key: 'certs/server.key', | ||
cert: 'certs/server.crt', | ||
verify_mode: 'none' | ||
} | ||
if ENV['TUDUDI_INTERNAL_SSL_ENABLED'] == 'true' | ||
ssl_bind '0.0.0.0', '9292', { | ||
key: 'certs/server.key', | ||
cert: 'certs/server.crt', | ||
verify_mode: 'none' | ||
} | ||
else | ||
bind 'tcp://0.0.0.0:9292' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters