Merge branch 'main' of ssh://gurgul.pro/artur/environment
This commit is contained in:
commit
297d02ad00
81 changed files with 3110 additions and 54 deletions
21
recipes/certbot/debian.yml
Normal file
21
recipes/certbot/debian.yml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
environment:
|
||||
PYTHONPATH: /home/artur/test
|
||||
|
||||
dependencies:
|
||||
- python
|
||||
|
||||
packages:
|
||||
- libffi-dev
|
||||
- libssl-dev
|
||||
|
||||
repository:
|
||||
url: https://github.com/certbot/certbot
|
||||
branch: v4.2.0
|
||||
version: 4.2.0
|
||||
|
||||
steps:
|
||||
- $SUDO pip3 install --prefix=$PREFIX certbot
|
||||
- $SUDO pip3 install --prefix=$PREFIX certbot-nginx
|
||||
|
||||
# can be executed like: pip install --prefix=$PREFIX certbot certbot-nginx
|
||||
# to see installed plugins: `certbot plugins`
|
||||
11
recipes/example-roda.rb
Normal file
11
recipes/example-roda.rb
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
require 'nginx'
|
||||
|
||||
class ExampleProxy < NGINXProxy
|
||||
domain "gurgul.org"
|
||||
service "forgejo"
|
||||
user "git"
|
||||
port 3000
|
||||
end
|
||||
|
||||
puts ExampleProxy.generate
|
||||
puts ExampleProxy.available_path
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
service:
|
||||
name: forgejo
|
||||
|
||||
archive:
|
||||
url: https://codeberg.org/forgejo/forgejo/releases/download/v12.0.1/forgejo-12.0.1-linux-amd64.xz
|
||||
|
||||
steps:
|
||||
- echo "ls"
|
||||
- mv forgejo-12.0.1-linux-amd64 ~/.local/bin/forgejo
|
||||
|
|
|
|||
|
|
@ -14,6 +14,6 @@ repository:
|
|||
|
||||
steps:
|
||||
- ./contrib/download_prerequisites
|
||||
- ./configure --prefix=$HOME/.local --enable-languages=c,c++ --disable-multilib
|
||||
- ./configure --prefix=$PREFIX --enable-languages=c,c++ --disable-multilib
|
||||
- make -j$(nproc)
|
||||
- make install
|
||||
- $SUDO make install
|
||||
|
|
|
|||
40
recipes/nginx/debian.yml
Normal file
40
recipes/nginx/debian.yml
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
|
||||
packages:
|
||||
- build-essential
|
||||
- libpcre2-dev
|
||||
- zlib1g
|
||||
- zlib1g-dev
|
||||
- libssl-dev
|
||||
|
||||
repository:
|
||||
url: https://github.com/nginx/nginx.git
|
||||
branch: release-1.29.0
|
||||
version: 1.29.0
|
||||
|
||||
# TODO: finish the configuration: last message of 6898551e-70a0-8331-8617-bcfc9bcf6af8
|
||||
steps:
|
||||
- echo "starting"
|
||||
- |
|
||||
./auto/configure \
|
||||
--prefix=$PREFIX \
|
||||
--with-http_ssl_module \
|
||||
--with-http_gzip_static_module \
|
||||
--with-stream \
|
||||
--with-http_v2_module \
|
||||
--with-pcre-jit \
|
||||
--with-threads \
|
||||
--with-file-aio \
|
||||
--with-http_ssl_module \
|
||||
--with-http_v2_module \
|
||||
--with-http_gzip_static_module \
|
||||
--with-stream=dynamic \
|
||||
--with-stream_ssl_module \
|
||||
--sbin-path=$PREFIX/nginx/sbin/nginx \
|
||||
--conf-path=$PREFIX/nginx/conf/nginx.conf \
|
||||
--pid-path=$PREFIX/nginx/run/nginx.pid \
|
||||
--lock-path=$PREFIX/nginx/run/nginx.lock \
|
||||
--error-log-path=$PREFIX/nginx/logs/error.log \
|
||||
--http-log-path=$PREFIX/nginx/logs/access.log
|
||||
|
||||
- make
|
||||
- $SUDO make install
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
require 'erb'
|
||||
|
||||
|
||||
class NGINXProxy
|
||||
class << self
|
||||
attr_accessor :domain, :port, :service, :user
|
||||
|
||||
def domain(value = nil)
|
||||
@domain = value unless value.nil?
|
||||
@domain
|
||||
end
|
||||
|
||||
def user(value = nil)
|
||||
@user = value unless value.nil?
|
||||
@user
|
||||
end
|
||||
|
||||
def port(value = nil)
|
||||
@port = value unless value.nil?
|
||||
@port
|
||||
end
|
||||
|
||||
# This is name of the daemon that will be installed
|
||||
# This is also master name user as user if not provided
|
||||
def service(value = nil)
|
||||
@service = value unless value.nil?
|
||||
@service
|
||||
end
|
||||
|
||||
def generate
|
||||
template = File.read("proxy.erb")
|
||||
template = ERB.new(template)
|
||||
template.result(binding)
|
||||
end
|
||||
|
||||
def available_path
|
||||
"/etc/nginx/sites-available/#{service}.#{domain}"
|
||||
end
|
||||
|
||||
def enabled_path
|
||||
"/etc/nginx/sites-available/#{service}.#{domain}"
|
||||
end
|
||||
|
||||
def install
|
||||
config = generate
|
||||
File.write
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class ExampleProxy < NGINXProxy
|
||||
domain "gurgul.org"
|
||||
service "forgejo"
|
||||
user "git"
|
||||
port 3000
|
||||
end
|
||||
|
||||
puts ExampleProxy.generate
|
||||
puts ExampleProxy.path
|
||||
23
recipes/nginx/nginx.service.erb
Normal file
23
recipes/nginx/nginx.service.erb
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
sudo tee /etc/systemd/system/nginx-custom.service >/dev/null <<'EOF'
|
||||
[Unit]
|
||||
Description=nginx (custom prefix)
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/pkg/nginx/run/nginx.pid
|
||||
ExecStart=/pkg/nginx/sbin/nginx
|
||||
ExecReload=/pkg/nginx/sbin/nginx -s reload
|
||||
ExecStop=/pkg/nginx/sbin/nginx -s quit
|
||||
TimeoutStopSec=5
|
||||
#User=nginx
|
||||
#Group=nginx
|
||||
LimitNOFILE=65535
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
# sudo systemctl daemon-reload
|
||||
# sudo systemctl enable --now nginx-custom
|
||||
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
server {
|
||||
root /home/<%= service %>/;
|
||||
|
||||
index index.html index.htm;
|
||||
server_name <%= domain %>;
|
||||
listen [::]:443 ssl ipv6only=on;
|
||||
listen 443 ssl;
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:<%= port %>;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
|
||||
proxy_connect_timeout 60s;
|
||||
proxy_send_timeout 60s;
|
||||
proxy_read_timeout 60s;
|
||||
}
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/<%= domain %>/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/<%= domain %>/privkey.pem;
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||
}
|
||||
|
|
@ -5,8 +5,9 @@ packages:
|
|||
repository:
|
||||
url: https://github.com/neovim/neovim.git
|
||||
branch: release-0.11
|
||||
version: 0.11
|
||||
|
||||
steps:
|
||||
- make distclean
|
||||
- make CMAKE_BUILD_TYPE=Release CMAKE_INSTALL_PREFIX=$HOME/.local
|
||||
- make install
|
||||
- make CMAKE_BUILD_TYPE=Release CMAKE_INSTALL_PREFIX=$PREFIX
|
||||
- $SUDO make install
|
||||
|
|
|
|||
24
recipes/postgres/debian-setup.yml
Normal file
24
recipes/postgres/debian-setup.yml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
environment:
|
||||
PG_DOMAIN: gurgul.org
|
||||
|
||||
|
||||
packages:
|
||||
- postgresql
|
||||
- postgresql-contrib
|
||||
|
||||
steps:
|
||||
- $SUDO systemctl enable postgresql
|
||||
- $SUDO systemctl start postgresql
|
||||
# Installing certificates
|
||||
- $SUDO mkdir /etc/postgresql/ssl
|
||||
- $SUDO cp /etc/letsencrypt/live/$PG_DOMAIN/fullchain.pem /etc/postgresql/ssl/server.crt
|
||||
- $SUDO cp /etc/letsencrypt/live/$PG_DOMAIN/privkey.pem /etc/postgresql/ssl/server.key
|
||||
- $SUDO chown postgres:postgres /etc/postgresql/ssl/server.*
|
||||
- $SUDO chmod 600 /etc/postgresql/ssl/server.key
|
||||
|
||||
|
||||
actions:
|
||||
# dat action postgresql:add-user -u user
|
||||
add-user:
|
||||
- sudo -u postgres createuser --no-superuser --no-createdb --no-createrole $DB_USER
|
||||
- sudo -u postgres createdb -O $DB_USER $DB_USER
|
||||
25
recipes/postgres/debian.yml
Normal file
25
recipes/postgres/debian.yml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
packages:
|
||||
- build-essential
|
||||
- libreadline-dev
|
||||
- zlib1g-dev
|
||||
- flex
|
||||
- bison
|
||||
- libssl-dev
|
||||
- libxml2-dev
|
||||
- libxslt1-dev
|
||||
- libpam0g-dev
|
||||
- libedit-dev
|
||||
|
||||
repository:
|
||||
# Original repository
|
||||
# https://git.postgresql.org/gitweb/?p=postgresql.git
|
||||
url: https://github.com/postgres/postgres.git
|
||||
branch: REL_17_5
|
||||
version: 17.5
|
||||
|
||||
steps:
|
||||
- ./configure --prefix=$PREFIX --with-openssl --with-systemd
|
||||
- make -j$CPUS
|
||||
- $SUDO mkdir -p $PREFIX
|
||||
- $SUDO make install
|
||||
28
recipes/qemu/macos.yml
Normal file
28
recipes/qemu/macos.yml
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
packages:
|
||||
- meson
|
||||
- ninja
|
||||
- pkg-config
|
||||
- glib
|
||||
- pixman
|
||||
- sdl2
|
||||
- libepoxy
|
||||
- libslirp
|
||||
- gettext
|
||||
|
||||
|
||||
# pkg-config --modversion sdl2 # should print a version
|
||||
# pkg-config --modversion epoxy # should print a version
|
||||
|
||||
repository:
|
||||
url: https://gitlab.com/qemu-project/qemu.git
|
||||
branch: v10.0.3
|
||||
|
||||
steps:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- |
|
||||
../configure \
|
||||
--enable-sdl \
|
||||
--enable-opengl \
|
||||
--target-list=aarch64-softmmu,x86_64-softmmu \
|
||||
--prefix="$HOME/.local/qemu-sdl"
|
||||
|
|
@ -16,6 +16,7 @@ packages:
|
|||
repository:
|
||||
url: https://github.com/ruby/ruby.git
|
||||
branch: v3_4_5
|
||||
version: 3.4.5
|
||||
|
||||
steps:
|
||||
- ./autogen.sh
|
||||
|
|
|
|||
45
recipes/vnc-viewer.yml
Normal file
45
recipes/vnc-viewer.yml
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
# # 1) Build & install FLTK 1.4 to /opt/fltk-1.4
|
||||
# git clone https://github.com/fltk/fltk.git
|
||||
# cd fltk
|
||||
# git checkout branch-1.4
|
||||
# cmake -S . -B build \
|
||||
# -DOPTION_BUILD_SHARED_LIBS=ON \
|
||||
# -DOPTION_USE_SYSTEM_LIBPNG=ON \
|
||||
# -DOPTION_USE_SYSTEM_LIBJPEG=ON \
|
||||
# -DOPTION_USE_SYSTEM_ZLIB=ON \
|
||||
# -DCMAKE_INSTALL_PREFIX=/opt/fltk-1.4
|
||||
# cmake --build build -j
|
||||
# sudo cmake --install build
|
||||
|
||||
# # 2) Point pkg-config and CMake at the new install
|
||||
# export PKG_CONFIG_PATH=/opt/fltk-1.4/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||
# export CMAKE_PREFIX_PATH=/opt/fltk-1.4:$CMAKE_PREFIX_PATH
|
||||
# # (optional but sometimes necessary)
|
||||
# export FLTK_DIR=/opt/fltk-1.4/lib/cmake/FLTK
|
||||
|
||||
|
||||
packages:
|
||||
- cmake
|
||||
- ninja
|
||||
- pkg-config
|
||||
- fltk
|
||||
- jpeg-turbo
|
||||
- libpng
|
||||
- zlib
|
||||
- gnutls
|
||||
- ffmpeg
|
||||
|
||||
# --recursive
|
||||
repository:
|
||||
url: https://github.com/TigerVNC/tigervnc.git
|
||||
url: v1.15.0
|
||||
|
||||
steps:
|
||||
- mkdir build && cd build
|
||||
- |
|
||||
cmake -G Ninja .. \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_VIEWER=ON \
|
||||
-DBUILD_SERVER=OFF \
|
||||
-DWITH_GNUTLS=ON
|
||||
- ninja
|
||||
Loading…
Add table
Add a link
Reference in a new issue