From 73c816559d0f6c7f3e0f762ef4dab7ccb1f794e4 Mon Sep 17 00:00:00 2001 From: Nicolas PERNOT Date: Mon, 19 Jan 2026 19:36:14 +0100 Subject: [PATCH] MERGE doc/adding_https_info INTO main (#709) * Suggest to use .env.example it's easier to start with a pre-done file than search for info about each configuration * added paragraph to tell how to activate https * fix type. As there was 2 space, I assumed there should be a line break * Corrects minor typos in HTTPS documentation Addresses a couple of minor typographical errors in the HTTPS documentation section, improving clarity and readability for users setting up HTTPS. * Clarifies .env setup in Docker documentation Corrects grammar and improves clarity in the Docker documentation regarding obtaining the `.env.example` file for initial configuration. * Fixes typo in HTTPS documentation Corrects a grammatical error in the Docker HTTPS setup guide, improving clarity for users configuring SSL. --- docs/hosting/docker.md | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/docs/hosting/docker.md b/docs/hosting/docker.md index ed129e8ed..a0a6a2105 100644 --- a/docs/hosting/docker.md +++ b/docs/hosting/docker.md @@ -51,7 +51,8 @@ At this point, the only file in your current working directory should be `compos ### Step 3 (optional): Configure your environment -By default, our `compose.example.yml` file runs without any configuration. That said, if you would like extra security (important if you're running outside of a local network), you can follow the steps below to set things up. +By default, our `compose.example.yml` file runs without any configuration. +That said, if you would like extra security (important if you're running outside of a local network), you can follow the steps below to set things up. If you're running the app locally and don't care much about security, you can skip this step. @@ -59,10 +60,10 @@ If you're running the app locally and don't care much about security, you can sk In order to configure the app, you will need to create a file called `.env`, which is where Docker will read environment variables from. -To do this, run the following command: +To do this, you should get our .env.example as a starting point: ```bash -touch .env +curl -o .env https://raw.githubusercontent.com/we-promise/sure/main/.env.example ``` #### Generate the app secret key @@ -94,6 +95,22 @@ SECRET_KEY_BASE="replacemewiththegeneratedstringfromthepriorstep" POSTGRES_PASSWORD="replacemewithyourdesireddatabasepassword" ``` +#### Using HTTPS + +Assuming you want to access your instance from the internet, you should have secured your URL address with an SSL certificate. +The Docker instance runs in plain HTTP and you need to tell it that you are redirecting your HTTPS stream to the HTTP one. +To do this, edit the `compose.yml` file and find the line stating: + +```yaml +RAILS_ASSUME_SSL: "false" +``` + +and change it to `true` + +```yaml +RAILS_ASSUME_SSL: "true" +``` + ### Step 4: Run the app You are now ready to run the app. Start with the following command to make sure everything is working: