Set up
www/nginx for example and share the packages with it. Then you can easily use it as a remote repository.
Poudriere has configuration examples for both Apache and nginx in
/usr/local/share/examples/poudriere.
Here's my
nginx.conf:
Code:
load_module /usr/local/libexec/nginx/ngx_http_fancyindex_module.so;
user www;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
# Allow gzipping js, css, log, svg and json files.
gzip on;
gzip_http_version 1.0;
gzip_comp_level 6;
gzip_proxied any;
gzip_min_length 1100;
gzip_buffers 16 8k;
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript image/g
if image/jpeg image/png application/json image/svg+xml;
types {
text/plain log;
}
server {
listen 80;
server_name ports.example.com;
root /usr/local/share/poudriere/html;
# Allow caching static resources
location ~* ^.+\.(jpg|jpeg|gif|png|ico|svg|woff|css|js|html)$ {
add_header Cache-Control "public";
expires 2d;
}
location /data {
alias /usr/local/poudriere/data/logs/bulk;
# Allow caching dynamic files but ensure they get rechecked
location ~* ^.+\.(log|txz|tbz|bz2|gz)$ {
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
# Don't log json requests as they come in frequently and ensure
# caching works as expected
location ~* ^.+\.(json)$ {
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
access_log off;
log_not_found off;
}
# Allow indexing only in log dirs
location ~ /data/?.*/(logs|latest-per-pkg)/ {
autoindex on;
}
break;
}
location /packages {
alias /usr/local/poudriere/data/packages;
fancyindex on;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/local/www/nginx-dist;
}
}
}
This shares the packages on
http://ports.example.com/packages but note that things are split up according to your jails and port names.
For example I have multiple repositories:
I have three jails in poudriere:
Code:
root@molly:~ # poudriere jail -l
JAILNAME VERSION ARCH METHOD TIMESTAMP PATH
112-release 11.2-RELEASE-p9 amd64 ftp 2019-03-03 14:04:03 /usr/local/poudriere/jails/112-release
120-release 12.0-RELEASE-p3 amd64 ftp 2019-04-13 17:32:11 /usr/local/poudriere/jails/120-release
12-stable 12.0-STABLE amd64 url=file:///storage/release/12-stable/ftp 2019-05-05 19:23:51 /usr/local/poudriere/jails/12-stable
With two ports trees:
Code:
root@molly:~ # poudriere ports -l
PORTSTREE METHOD TIMESTAMP PATH
desktop svn+https 2019-05-18 22:40:11 /usr/local/poudriere/ports/desktop
server svn+https 2019-05-18 22:37:50 /usr/local/poudriere/ports/server
This gives me a total of 6 different repositories.