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 ## Install
```bash ```bash
mkdir -p /home/docker/certs sudo mkdir -p /home/docker/certs
mkdir -p /home/docker/registry-ui/conf sudo mkdir -p /home/docker/registry-ui/conf
mkdir -p /home/docker/registry-ui/data 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 ```bash
sudo cp config.yml /home/docker/registry-ui/conf/ 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 ## Run
### docker ### docker
```bash ```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 ### docker compose
```bash ```bash
@ -33,14 +33,14 @@ docker compose up -d
```bash ```bash
# General setup for the virtual host # General setup for the virtual host
<VirtualHost *:80> <VirtualHost *:80>
ServerName registry-ui.gmolab.net ServerName registry-ui.gmotech.net
ServerAlias registry-ui ServerAlias registry-ui
CustomLog logs/registry-ui_access_log common CustomLog logs/registry-ui_access_log common
ErrorLog logs/registry-ui_error_log ErrorLog logs/registry-ui_error_log
# redirect to https # redirect to https
RewriteEngine on RewriteEngine on
RewriteCond %{SERVER_NAME} =registry-ui [OR] 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] RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost> </VirtualHost>
``` ```
@ -48,7 +48,7 @@ docker compose up -d
```bash ```bash
# general setup for the virtual host # general setup for the virtual host
<VirtualHost *:443> <VirtualHost *:443>
ServerName registry-ui.gmolab.net ServerName registry-ui.gmotech.net
ServerAlias registry-ui ServerAlias registry-ui
CustomLog logs/registry-ui_access_log common CustomLog logs/registry-ui_access_log common
ErrorLog logs/registry-ui_error_log 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" Header always set Strict-Transport-Security "max-age=63072000"
# certificats # certificats
SSLCertificateFile "/etc/httpd/auth/cert/gmolab.net.crt" SSLCertificateFile "/etc/httpd/auth/cert/gmotech.net.crt"
SSLCertificateKeyFile "/etc/httpd/auth/cert/gmolab.net.key" SSLCertificateKeyFile "/etc/httpd/auth/cert/gmotech.net.key"
SSLCertificateChainFile "/etc/httpd/auth/cert/gmolabCA.crt" SSLCertificateChainFile "/etc/httpd/auth/cert/gmotechCA.crt"
# proxy # proxy
SSLProxyEngine On SSLProxyEngine On
@ -88,4 +88,4 @@ https://github.com/Quiq/registry-ui
## Changelog ## Changelog
### v1.0 - 2024-11-30 ### v1.0 - 2024-11-30
#### Added #### 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 endpoint and authentication.
registry: registry:
# Registry hostname (without protocol but may include port). # 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. # Allow to access non-https enabled registry.
insecure: false insecure: false
@ -28,8 +28,8 @@ registry:
# They need to have a full access to the 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 # If token authentication service is enabled, it will be auto-discovered and those credentials
# will be used to obtain access tokens. # will be used to obtain access tokens.
username: gilles username:
password: pa55w0rd password:
# Set password to '' in order to read it from the file below. Otherwise, it is ignored. # Set password to '' in order to read it from the file below. Otherwise, it is ignored.
password_file: /run/secrets/registry_password_file password_file: /run/secrets/registry_password_file

View File

@ -9,7 +9,7 @@ services:
environment: environment:
TZ: Europe/Zurich TZ: Europe/Zurich
volumes: 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/conf/config.yml:/opt/config.yml:ro
- /home/docker/registry-ui/data:/opt/data - /home/docker/registry-ui/data:/opt/data