File tree 5 files changed +39
-85
lines changed
5 files changed +39
-85
lines changed Original file line number Diff line number Diff line change @@ -9,3 +9,4 @@ volumes/core/config/oracle/wallet/*.lck
9
9
volumes /core /config /oracle /wallet /* .p12
10
10
volumes /core /config /oracle /wallet /* .sso
11
11
volumes /web_gui /nginx /certs /nginx. *
12
+ volumes /web_gui /nginx /htpasswd /.htpasswd
Original file line number Diff line number Diff line change @@ -10,13 +10,15 @@ services:
10
10
depends_on :
11
11
core :
12
12
condition : service_started
13
+ environment :
14
+ - FRONTEND_BASE_URL=${FRONTEND_BASE_URL:-}
13
15
volumes :
14
- - ./volumes/web_gui/nginx/templates :/etc/nginx/templates
16
+ - ./volumes/web_gui/nginx/htpasswd :/etc/nginx/htpasswd
15
17
- ./volumes/web_gui/nginx/certs:/etc/nginx/certs
16
18
networks :
17
19
- common
18
20
ports :
19
- - ${EXTERNAL_HTTP_PORT}:443
21
+ - ${EXTERNAL_HTTP_PORT}:8443
20
22
21
23
# Migrator core exposed as REST service API
22
24
core :
Original file line number Diff line number Diff line change @@ -254,11 +254,17 @@ installed_from_archive() {
254
254
255
255
generate_self_signed_certificate () {
256
256
info " Generating self-signed TLS/SSL certificate"
257
- docker compose run --no-deps web_gui \
258
- openssl req -x509 -nodes -newkey rsa:2048 \
259
- -keyout " ${NGINX_SSL_CERTIFICATE_KEY} " -out " ${NGINX_SSL_CERTIFICATE} "
260
- docker compose run --no-deps web_gui \
261
- chown $UID :$( id -g) " ${NGINX_SSL_CERTIFICATE_KEY} " " ${NGINX_SSL_CERTIFICATE} "
257
+ edition=$( print_env ' EDITION' )
258
+ version=$( print_env ' VERSION' )
259
+ docker run -it \
260
+ cybertecpostgresql/cybertec_migrator-${edition} -web_gui:${version} \
261
+ bash -c " openssl genrsa -out /tmp/nginx.key 4096 && cat /tmp/nginx.key" \
262
+ > ./volumes/web_gui/nginx/certs/nginx.key
263
+ docker run -it \
264
+ --mount " type=bind,source=$( pwd) /volumes/web_gui/nginx/certs/nginx.key,target=/tmp/nginx.key" \
265
+ cybertecpostgresql/cybertec_migrator-${edition} -web_gui:${version} \
266
+ bash -c " openssl req -new -key /tmp/nginx.key -x509 -out /tmp/nginx.crt -days 3650 -subj \" /C=AT/ST=Lower Austria/L=Wöllersdorf/O=CYBERTEC PostgreSQL International GmbH/OU=Development/CN=cybertec.at\" && cat /tmp/nginx.crt" \
267
+ > ./volumes/web_gui/nginx/certs/nginx.crt
262
268
ok " Generated self-signed TLS/SSL certificate"
263
269
next_step_upgrade
264
270
}
Original file line number Diff line number Diff line change
1
+ # Basic Authentication
2
+
3
+ To enable HTTP Basic Auth, create a new file ` .htpasswd ` :
4
+
5
+ ``` shell
6
+ touch .htpasswd
7
+ ```
8
+
9
+ To add a new user, start by adding a username (replace the example with your own username):
10
+ ``` shell
11
+ sh -c " echo -n 'john-doe:' >> ./.htpasswd"
12
+ ```
13
+
14
+ Finish the process by generating a password:
15
+ ``` shell
16
+ sh -c " openssl passwd -apr1 >> ./.htpasswd"
17
+ ```
18
+
19
+ Restart the migrator for the new users to come into effect:
20
+ ``` shell
21
+ # Within the repository root
22
+ ./migrator up
23
+ ```
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments