Skip to content

Commit 3de4f69

Browse files
authored
Merge pull request #142 from gdevenyi/patch-2
Generate random passwords in update-docker-env.sh
2 parents 3a39b25 + 102be2c commit 3de4f69

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

update-docker-env.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ cat > worklenz-backend/.env << EOL
7373
NODE_ENV=production
7474
PORT=3000
7575
SESSION_NAME=worklenz.sid
76-
SESSION_SECRET=change_me_in_production
77-
COOKIE_SECRET=change_me_in_production
76+
SESSION_SECRET=$(openssl rand -base64 48)
77+
COOKIE_SECRET=$(openssl rand -base64 48)
7878
7979
# CORS
8080
SOCKET_IO_CORS=${FRONTEND_URL}
@@ -92,7 +92,7 @@ LOGIN_SUCCESS_REDIRECT="${FRONTEND_URL}/auth/authenticating"
9292
DB_HOST=db
9393
DB_PORT=5432
9494
DB_USER=postgres
95-
DB_PASSWORD=password
95+
DB_PASSWORD=$(openssl rand -base64 48)
9696
DB_NAME=worklenz_db
9797
DB_MAX_CLIENTS=50
9898
USE_PG_NATIVE=true
@@ -123,7 +123,7 @@ SLACK_WEBHOOK=
123123
COMMIT_BUILD_IMMEDIATELY=true
124124
125125
# JWT Secret
126-
JWT_SECRET=change_me_in_production
126+
JWT_SECRET=$(openssl rand -base64 48)
127127
EOL
128128

129129
echo "Environment configuration updated for ${HOSTNAME} with" $([ "$USE_SSL" = "true" ] && echo "HTTPS/WSS" || echo "HTTP/WS")
@@ -138,4 +138,4 @@ echo "Frontend URL: ${FRONTEND_URL}"
138138
echo "API URL: ${HTTP_PREFIX}${HOSTNAME}:3000"
139139
echo "Socket URL: ${WS_PREFIX}${HOSTNAME}:3000"
140140
echo "MinIO Dashboard URL: ${MINIO_DASHBOARD_URL}"
141-
echo "CORS is configured to allow requests from: ${FRONTEND_URL}"
141+
echo "CORS is configured to allow requests from: ${FRONTEND_URL}"

0 commit comments

Comments
 (0)