config for gmotech.net

This commit is contained in:
Gilles Mouchet 2024-12-12 20:59:47 +01:00
parent bd99d6c9e0
commit e5edbdbb29
3 changed files with 18 additions and 18 deletions

View File

@ -3,11 +3,11 @@ This docker compose run registry on docker
## Install
```bash
mkdir -p /home/docker/certs
mkdir -p /home/docker/registry-ui/conf
mkdir -p /home/docker/registry-ui/data
sudo mkdir -p /home/docker/certs
sudo mkdir -p /home/docker/registry-ui/conf
sudo mkdir -p /home/docker/registry-ui/data
```
Set ***password:*** in file `config.yml` and copy in `/home/docker/registry-ui/conf/`
Set ***username:*** and ***password:*** in file `config.yml` and copy in `/home/docker/registry-ui/conf/`
```bash
sudo cp config.yml /home/docker/registry-ui/conf/
```
@ -19,9 +19,9 @@ Copy crt, key and CA cert files on `/home/docker/certs/`
## Run
### docker
```bash
docker run --network=host -d -p 8000:8000 -v /home/docker/certs/gmolabCA.crt:/etc/ssl/certs/ca-certificates.crt:ro -v ./config.yml:/opt/config.yml:ro quiq/registry-ui:latest
docker run --network=host -d -p 8000:8000 -v /home/docker/certs/gmotechCA.crt:/etc/ssl/certs/ca-certificates.crt:ro -v ./config.yml:/opt/config.yml:ro quiq/registry-ui:latest
```
Teh optin `--network` tell to docker to use /etc/hosts instead DNS
The option `--network` tell to docker to use /etc/hosts instead DNS
### docker compose
```bash
@ -33,14 +33,14 @@ docker compose up -d
```bash
# General setup for the virtual host
<VirtualHost *:80>
ServerName registry-ui.gmolab.net
ServerName registry-ui.gmotech.net
ServerAlias registry-ui
CustomLog logs/registry-ui_access_log common
ErrorLog logs/registry-ui_error_log
# redirect to https
RewriteEngine on
RewriteCond %{SERVER_NAME} =registry-ui [OR]
RewriteCond %{SERVER_NAME} =registry-ui.gmolab.net
RewriteCond %{SERVER_NAME} =registry-ui.gmotech.net
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
```
@ -48,7 +48,7 @@ docker compose up -d
```bash
# general setup for the virtual host
<VirtualHost *:443>
ServerName registry-ui.gmolab.net
ServerName registry-ui.gmotech.net
ServerAlias registry-ui
CustomLog logs/registry-ui_access_log common
ErrorLog logs/registry-ui_error_log
@ -68,9 +68,9 @@ RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:!aNULL
Header always set Strict-Transport-Security "max-age=63072000"
# certificats
SSLCertificateFile "/etc/httpd/auth/cert/gmolab.net.crt"
SSLCertificateKeyFile "/etc/httpd/auth/cert/gmolab.net.key"
SSLCertificateChainFile "/etc/httpd/auth/cert/gmolabCA.crt"
SSLCertificateFile "/etc/httpd/auth/cert/gmotech.net.crt"
SSLCertificateKeyFile "/etc/httpd/auth/cert/gmotech.net.key"
SSLCertificateChainFile "/etc/httpd/auth/cert/gmotechCA.crt"
# proxy
SSLProxyEngine On
@ -88,4 +88,4 @@ https://github.com/Quiq/registry-ui
## Changelog
### v1.0 - 2024-11-30
#### Added
- initial version by [GMo](mailto:gilles.mouchet@gmail.com)
- initial version by [GMo](mailto:gilles.mouchet@gmail.com)

View File

@ -20,7 +20,7 @@ performance:
# Registry endpoint and authentication.
registry:
# Registry hostname (without protocol but may include port).
hostname: registry-docker.gmolab.net
hostname: registry-docker.gmotech.net
# Allow to access non-https enabled registry.
insecure: false
@ -28,8 +28,8 @@ registry:
# They need to have a full access to the registry.
# If token authentication service is enabled, it will be auto-discovered and those credentials
# will be used to obtain access tokens.
username: gilles
password: pa55w0rd
username:
password:
# Set password to '' in order to read it from the file below. Otherwise, it is ignored.
password_file: /run/secrets/registry_password_file

View File

@ -9,7 +9,7 @@ services:
environment:
TZ: Europe/Zurich
volumes:
- /home/docker/certs/gmolabCA.crt:/etc/ssl/certs/ca-certificates.crt
- /home/docker/certs/gmotechCA.crt:/etc/ssl/certs/ca-certificates.crt
- /home/docker/registry-ui/conf/config.yml:/opt/config.yml:ro
- /home/docker/registry-ui/data:/opt/data