2026-03-12 20:23:15
This commit is contained in:
72
my/Rocky_Linux/gitlab_ce_docker_second_edition.md
Normal file
72
my/Rocky_Linux/gitlab_ce_docker_second_edition.md
Normal file
@@ -0,0 +1,72 @@
|
||||
In this example gitlab will be accessible through the public URL: http://code.databasepro.fr
|
||||
|
||||
As prerequisits:
|
||||
- A valid SSL certificate for the subdomain `code.databasepro.fr` was generated (using **LetsEncrypt** `certbot`)
|
||||
- a reverse-proxy was defined.
|
||||
|
||||
Examlple of *nginx* reverse-proxy configuration:
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name code.databasepro.fr;
|
||||
access_log /wwwlogs/code.databasepro.fr.access.log combined;
|
||||
error_log /wwwlogs/code.databasepro.fr.error.log info;
|
||||
location / {
|
||||
root /www/code.databasepro.fr;
|
||||
index index.html index.htm;
|
||||
autoindex on;
|
||||
}
|
||||
rewrite ^ https://code.databasepro.fr$request_uri? permanent;
|
||||
}
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
ssl_certificate /etc/letsencrypt/live/code.databasepro.fr/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/code.databasepro.fr/privkey.pem;
|
||||
ssl_stapling on;
|
||||
server_name code.databasepro.fr;
|
||||
access_log /wwwlogs/code.databasepro.fr.access.log combined;
|
||||
error_log /wwwlogs/code.databasepro.fr.error.log info;
|
||||
location / {
|
||||
proxy_pass https://192.168.0.91:7004/;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Create persistent directories:
|
||||
|
||||
mkdir /app/persistent_docker/gitlab
|
||||
cd /app/persistent_docker/gitlab
|
||||
mkdir config data logs
|
||||
|
||||
|
||||
Pull the *Comunity Edition* of gitlab:
|
||||
|
||||
docker pull gitlab/gitlab-ce
|
||||
|
||||
|
||||
Create `docker-compose.yaml` file in `/app/persistent_docker/gitlab`:
|
||||
|
||||
services:
|
||||
gitlab:
|
||||
image: 'gitlab/gitlab-ce:latest'
|
||||
restart: always
|
||||
hostname: 'code.databasepro.fr'
|
||||
environment:
|
||||
gitlab_omnibus_config: |
|
||||
external_url 'https://code.databasepro.fr'
|
||||
# add any other gitlab.rb configuration here, each on its own line
|
||||
ports:
|
||||
- 7004:443
|
||||
volumes:
|
||||
- /app/persistent_docker/gitlab/config:/etc/gitlab
|
||||
- /app/persistent_docker/gitlab/logs:/var/log/gitlab
|
||||
- /app/persistent_docker/gitlab/data:/var/opt/gitlab
|
||||
|
||||
|
||||
Start container:
|
||||
|
||||
docker-compose up -d
|
||||
|
||||
|
||||
Initial `root` password can be found in `/app/persistent_docker/gitlab/config/initial_root_password`
|
||||
|
||||
41
my/Rocky_Linux/install_01.txt
Normal file
41
my/Rocky_Linux/install_01.txt
Normal file
@@ -0,0 +1,41 @@
|
||||
virt-install \
|
||||
--graphics vnc,listen=0.0.0.0 \
|
||||
--name=seedmachine \
|
||||
--vcpus=2 \
|
||||
--memory=4096 \
|
||||
--network bridge=br0 \
|
||||
--network bridge=br0 \
|
||||
--cdrom=/vm/hdd0/_kit_/Rocky-8.5-x86_64-minimal.iso \
|
||||
--disk /vm/ssd0/seedmachine/hdd_01.img,size=16 \
|
||||
--disk /vm/ssd0/seedmachine/app_01.img,size=32 \
|
||||
--disk /vm/ssd0/seedmachine/swap_01.img,size=8 \
|
||||
--os-variant=rocky8.5
|
||||
|
||||
|
||||
# Packages
|
||||
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
|
||||
dnf install epel-release elrepo-release -y
|
||||
|
||||
dnf install -y htop.x86_64 lsof.x86_64 cifs-utils.x86_64 tar.x86_64 bzip2.x86_64 telnet.x86_64 nmap-ncat.x86_64 bind-utils.x86_64 wget epel-release
|
||||
dnf install -y rlwrap.x86_64 screen.x86_64 banner.x86_64 cowsay.noarch certbot.noarch kernel-headers.x86_64 kernel-devel kmod-wireguard wireguard-tools git.x86_64
|
||||
dnf install -y ethtool.x86_64 net-tools.x86_64 ipmitool.x86_64
|
||||
dnf install -y gcc.x86_64 redhat-rpm-config automake.noarch make.x86_64
|
||||
|
||||
# Ruby
|
||||
Install Ruby avec rvm
|
||||
Install roo module avec gem
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Firewall
|
||||
systemctl status firewalld
|
||||
systemctl stop firewalld
|
||||
systemctl disable firewalld
|
||||
|
||||
# SELinux
|
||||
getenforce
|
||||
vi /etc/selinux/config
|
||||
disabled
|
||||
|
||||
46
my/Rocky_Linux/mazzolino_tiddlywiki.md
Normal file
46
my/Rocky_Linux/mazzolino_tiddlywiki.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# Get basic docker image
|
||||
|
||||
docker pull mazzolino/tiddlywiki
|
||||
|
||||
|
||||
# Customize the image upgrading tiddlywiki
|
||||
|
||||
Create persistent directory:
|
||||
|
||||
mkdir -p /app/persistent_docker/tiddlywiki
|
||||
|
||||
Create `Dockerfile`:
|
||||
|
||||
FROM mazzolino/tiddlywiki:latest
|
||||
MAINTAINER Valeriu PLESNILA
|
||||
RUN npm update -g tiddlywiki
|
||||
|
||||
|
||||
Build new image `my_tiddlywiki`:
|
||||
|
||||
docker build -t my_tiddlywiki .
|
||||
|
||||
|
||||
Create `docker-compose.yaml` file:
|
||||
|
||||
services:
|
||||
wiki:
|
||||
image: my_tiddlywiki
|
||||
restart: always
|
||||
environment:
|
||||
- USERNAME=*****
|
||||
- PASSWORD=*****
|
||||
ports:
|
||||
- 8080:8080
|
||||
volumes:
|
||||
- /app/persistent_docker/tiddlywiki:/var/lib/tiddlywiki
|
||||
|
||||
|
||||
# Create and run the container:
|
||||
|
||||
docker-compose up -d
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
66
my/Rocky_Linux/nginx_docker.md
Normal file
66
my/Rocky_Linux/nginx_docker.md
Normal file
@@ -0,0 +1,66 @@
|
||||
List available docker images:
|
||||
|
||||
docker search nginx
|
||||
|
||||
Download official image:
|
||||
|
||||
docker pull nginx
|
||||
|
||||
Create persistent directory:
|
||||
|
||||
mkdir -p /app/persistent_docker/nginx
|
||||
cd /app/persistent_docker/nginx
|
||||
mkdir www conf logs
|
||||
|
||||
Create `/app/persistent_docker/nginx/conf/nginx.conf`:
|
||||
|
||||
events {
|
||||
|
||||
}
|
||||
error_log /wwwlogs/error.log info;
|
||||
http {
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
access_log /wwwlogs/access.log combined;
|
||||
location / {
|
||||
root /www/demo;
|
||||
index index.html index.htm;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Create then root directory for default site:
|
||||
|
||||
mkdir /app/persistent_docker/nginx/www/demo
|
||||
echo "Hello world" > /app/persistent_docker/nginx/www/demo/index.html
|
||||
|
||||
Start the container:
|
||||
|
||||
docker run -p 80:80 -p 443:443 --name nginx -v /etc/letsencrypt:/etc/letsencrypt -v /app/persistent_docker/nginx/www:/www -v /app/persistent_docker/nginx/conf:/etc/nginx -v /app/persistent_docker/nginx/logs:/wwwlogs -d nginx
|
||||
|
||||
|
||||
In order to use docker-compose, create `docker-compose.yml`:
|
||||
|
||||
services:
|
||||
nginx:
|
||||
image: nginx
|
||||
restart: always
|
||||
volumes:
|
||||
- /etc/letsencrypt:/etc/letsencrypt
|
||||
- /app/persistent_docker/nginx/www:/www
|
||||
- /app/persistent_docker/nginx/conf:/etc/nginx
|
||||
- /app/persistent_docker/nginx/logs:/wwwlogs
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
|
||||
|
||||
Start the container and set the autostart:
|
||||
|
||||
docker-compose up -d
|
||||
docker update --restart unless-stopped nginx
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user