Skip to content

Commit

Permalink
#602 HTTPS ENVs
Browse files Browse the repository at this point in the history
  • Loading branch information
tariqksoliman committed Dec 19, 2024
1 parent 23d8e8a commit b4bb6e3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions docker-compose.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ services:
restart: on-failure
volumes:
- ./Missions:/usr/src/app/Missions
- ./ssl:/usr/src/app/ssl

stac-fastapi:
image: ghcr.io/stac-utils/stac-fastapi-pgstac:3.0.0
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/Setup/ENVs/ENVs.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ If true, MMGIS will use an https server with the, now required, `HTTPS_KEY` and

#### `HTTPS_KEY=`

Relative path to key. If using docker, make sure the key is mounted. Everything under 'ssl/' is gitignored.
Relative path to key. If using docker, make sure the key is mounted. Everything under './ssl/' is gitignored and './ssl/' is mounted into docker.

#### `HTTPS_CERT=`

Relative path to cert. If using docker, make sure the cert is mounted. Everything under 'ssl/' is gitignored.
Relative path to cert. If using docker, make sure the cert is mounted. Everything under './ssl/' is gitignored and './ssl/' is mounted into docker.

#### `DB_POOL_MAX=`

Expand Down
8 changes: 4 additions & 4 deletions sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ NODE_ENV=development
# If false, use a wrapping https proxy server instead and block PORT from being public
HTTPS=false

# Relative path to key. If using docker, make sure the key is mounted. Everything under 'ssl/' is gitignored.
HTTPS_KEY='ssl/sample-key.pem'
# Relative path to key. If using docker, make sure the key is mounted.Everything under './ssl/' is gitignored and './ssl/' is mounted into docker.
HTTPS_KEY='ssl/sample.key'

# Relative path to cert. If using docker, make sure the cert is mounted. Everything under 'ssl/' is gitignored.
HTTPS_CERT='ssl/sample-cert.cert'
# Relative path to cert. If using docker, make sure the cert is mounted. Everything under './ssl/' is gitignored and './ssl/' is mounted into docker.
HTTPS_CERT='ssl/sample.cert'


# SECRET
Expand Down
4 changes: 2 additions & 2 deletions scripts/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -886,8 +886,8 @@ setups.getBackendSetups(function (setups) {
if (process.env.HTTPS == "true") {
httpServer = https.createServer(
{
key: fs.readFileSync("test/fixtures/keys/agent2-key.pem"),
cert: fs.readFileSync("test/fixtures/keys/agent2-cert.cert"),
key: fs.readFileSync(process.env.HTTPS_KEY),
cert: fs.readFileSync(process.env.HTTPS_CERT),
},
app
);
Expand Down

0 comments on commit b4bb6e3

Please sign in to comment.