Skip to content

Commit 25bf6aa

Browse files
author
AdminServ
committed
️️chore(auto): Docker Sync 🔄 12/20/2024 01:55 UTC
1 parent d7f058c commit 25bf6aa

File tree

140 files changed

+1885
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+1885
-0
lines changed

package/docker/Dockerfile

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# syntax=docker/dockerfile:1
2+
3+
# #
4+
# @project keeweb
5+
# @usage keeweb docker image
6+
# @file Dockerfile
7+
# @repo https://github.com/keeweb/keeweb
8+
# https://github.com/keeweb/alpine-base
9+
# https://hub.docker.com/repository/docker/keeweb/keeweb
10+
# https://hub.docker.com/repository/docker/keeweb/alpine-base
11+
# #
12+
13+
FROM ghcr.io/keeweb/alpine-base:3.20-amd64
14+
15+
# #
16+
# Set Args
17+
# #
18+
19+
ARG BUILD_DATE
20+
ARG VERSION
21+
ARG NGINX_VERSION
22+
23+
# #
24+
# Set Labels
25+
# #
26+
27+
LABEL maintainer="Aetherinox"
28+
LABEL org.opencontainers.image.authors="Aetherinox, Antelle"
29+
LABEL org.opencontainers.image.vendor="Keeweb"
30+
LABEL org.opencontainers.image.title="Keeweb Password Manager"
31+
LABEL org.opencontainers.image.description="Keeweb password manager"
32+
LABEL org.opencontainers.image.source="https://github.com/keeweb/keeweb"
33+
LABEL org.opencontainers.image.documentation="https://github.com/keeweb/keeweb"
34+
LABEL org.opencontainers.image.url="https://github.com/keeweb/keeweb/pkgs/container/keeweb"
35+
LABEL org.opencontainers.image.licenses="MIT"
36+
LABEL build_version="Keeweb v${VERSION} build-date: ${BUILD_DATE}"
37+
38+
# #
39+
# Set Env Var
40+
# #
41+
42+
ENV TZ="Etc/UTC"
43+
ENV URL_REPO_BASE="https://github.com/keeweb/alpine-base/pkgs/container/alpine-base"
44+
ENV URL_REPO_APP="https://github.com/keeweb/keeweb/pkgs/container/keeweb"
45+
ENV FILE_NAME="index.html"
46+
ENV PORT_HTTP=80
47+
ENV PORT_HTTPS=443
48+
49+
# #
50+
# Install
51+
# #
52+
53+
RUN \
54+
if [ -z ${NGINX_VERSION+x} ]; then \
55+
NGINX_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
56+
&& awk '/^P:nginx$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
57+
fi && \
58+
apk add --no-cache \
59+
wget \
60+
logrotate \
61+
openssl \
62+
apache2-utils \
63+
nginx==${NGINX_VERSION} \
64+
nginx-mod-http-fancyindex==${NGINX_VERSION} && \
65+
echo "**** Install Build Packages ****" && \
66+
echo "**** Configure Nginx ****" && \
67+
echo 'fastcgi_param HTTP_PROXY ""; # https://httpoxy.org/' >> \
68+
/etc/nginx/fastcgi_params && \
69+
echo 'fastcgi_param PATH_INFO $fastcgi_path_info; # http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_split_path_info' >> \
70+
/etc/nginx/fastcgi_params && \
71+
echo 'fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # https://www.nginx.com/resources/wiki/start/topics/examples/phpfcgi/#connecting-nginx-to-php-fpm' >> \
72+
/etc/nginx/fastcgi_params && \
73+
echo 'fastcgi_param SERVER_NAME $host; # Send HTTP_HOST as SERVER_NAME. If HTTP_HOST is blank, send the value of server_name from nginx (default is `_`)' >> \
74+
/etc/nginx/fastcgi_params && \
75+
rm -f /etc/nginx/http.d/default.conf && \
76+
rm -f /etc/nginx/conf.d/stream.conf && \
77+
rm -f /config/www/index.html && \
78+
echo "**** Setup Logrotate ****" && \
79+
sed -i "s#/var/log/messages {}.*# #g" \
80+
/etc/logrotate.conf && \
81+
sed -i 's#/usr/sbin/logrotate /etc/logrotate.conf#/usr/sbin/logrotate /etc/logrotate.conf -s /config/log/logrotate.status#g' \
82+
/etc/periodic/daily/logrotate
83+
84+
# #
85+
# Set work directory
86+
# #
87+
88+
WORKDIR /config/www
89+
90+
# #
91+
# Add local files
92+
# #
93+
94+
COPY root/ /
95+
96+
# #
97+
# Ports and volumes
98+
# #
99+
100+
EXPOSE ${PORT_HTTP} ${PORT_HTTPS}
101+
102+
# #
103+
# In case user sets up the cron for a longer duration, do a first run
104+
# and then keep the container running. Hacky, but whatever.
105+
# #
106+
107+
# CMD ["sh", "-c", "/run.sh ; /task.sh ; tail -f /dev/null"]

package/docker/Dockerfile.aarch64

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# syntax=docker/dockerfile:1
2+
3+
# #
4+
# @project keeweb
5+
# @usage keeweb docker image
6+
# @file Dockerfile
7+
# @repo https://github.com/keeweb/keeweb
8+
# https://github.com/keeweb/alpine-base
9+
# https://hub.docker.com/repository/docker/keeweb/keeweb
10+
# https://hub.docker.com/repository/docker/keeweb/alpine-base
11+
# #
12+
13+
FROM ghcr.io/keeweb/alpine-base:3.20-arm64
14+
15+
# #
16+
# Set Args
17+
# #
18+
19+
ARG BUILD_DATE
20+
ARG VERSION
21+
ARG NGINX_VERSION
22+
23+
# #
24+
# Set Labels
25+
# #
26+
27+
LABEL maintainer="Aetherinox"
28+
LABEL org.opencontainers.image.authors="Aetherinox, Antelle"
29+
LABEL org.opencontainers.image.vendor="Keeweb"
30+
LABEL org.opencontainers.image.title="Keeweb Password Manager"
31+
LABEL org.opencontainers.image.description="Keeweb password manager"
32+
LABEL org.opencontainers.image.source="https://github.com/keeweb/keeweb"
33+
LABEL org.opencontainers.image.documentation="https://github.com/keeweb/keeweb"
34+
LABEL org.opencontainers.image.url="https://github.com/keeweb/keeweb/pkgs/container/keeweb"
35+
LABEL org.opencontainers.image.licenses="MIT"
36+
LABEL build_version="Keeweb v${VERSION} build-date: ${BUILD_DATE}"
37+
38+
# #
39+
# Set Env Var
40+
# #
41+
42+
ENV TZ="Etc/UTC"
43+
ENV URL_REPO_BASE="https://github.com/keeweb/alpine-base/pkgs/container/alpine-base"
44+
ENV URL_REPO_APP="https://github.com/keeweb/keeweb/pkgs/container/keeweb"
45+
ENV FILE_NAME="index.html"
46+
ENV PORT_HTTP=80
47+
ENV PORT_HTTPS=443
48+
49+
# #
50+
# Install
51+
# #
52+
53+
RUN \
54+
if [ -z ${NGINX_VERSION+x} ]; then \
55+
NGINX_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
56+
&& awk '/^P:nginx$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
57+
fi && \
58+
apk add --no-cache \
59+
wget \
60+
logrotate \
61+
openssl \
62+
apache2-utils \
63+
nginx==${NGINX_VERSION} \
64+
nginx-mod-http-fancyindex==${NGINX_VERSION} && \
65+
echo "**** Install Build Packages ****" && \
66+
echo "**** Configure Nginx ****" && \
67+
echo 'fastcgi_param HTTP_PROXY ""; # https://httpoxy.org/' >> \
68+
/etc/nginx/fastcgi_params && \
69+
echo 'fastcgi_param PATH_INFO $fastcgi_path_info; # http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_split_path_info' >> \
70+
/etc/nginx/fastcgi_params && \
71+
echo 'fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # https://www.nginx.com/resources/wiki/start/topics/examples/phpfcgi/#connecting-nginx-to-php-fpm' >> \
72+
/etc/nginx/fastcgi_params && \
73+
echo 'fastcgi_param SERVER_NAME $host; # Send HTTP_HOST as SERVER_NAME. If HTTP_HOST is blank, send the value of server_name from nginx (default is `_`)' >> \
74+
/etc/nginx/fastcgi_params && \
75+
rm -f /etc/nginx/http.d/default.conf && \
76+
rm -f /etc/nginx/conf.d/stream.conf && \
77+
rm -f /config/www/index.html && \
78+
echo "**** Setup Logrotate ****" && \
79+
sed -i "s#/var/log/messages {}.*# #g" \
80+
/etc/logrotate.conf && \
81+
sed -i 's#/usr/sbin/logrotate /etc/logrotate.conf#/usr/sbin/logrotate /etc/logrotate.conf -s /config/log/logrotate.status#g' \
82+
/etc/periodic/daily/logrotate
83+
84+
# #
85+
# Set work directory
86+
# #
87+
88+
WORKDIR /config/www
89+
90+
# #
91+
# Add local files
92+
# #
93+
94+
COPY root/ /
95+
96+
# #
97+
# Ports and volumes
98+
# #
99+
100+
EXPOSE ${PORT_HTTP} ${PORT_HTTPS}
101+
102+
# #
103+
# In case user sets up the cron for a longer duration, do a first run
104+
# and then keep the container running. Hacky, but whatever.
105+
# #
106+
107+
# CMD ["sh", "-c", "/run.sh ; /task.sh ; tail -f /dev/null"]
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
3+
# #
4+
# @project keeweb
5+
# @usage keeweb docker image
6+
# @file plugins
7+
# @repo https://github.com/keeweb/keeweb
8+
# https://github.com/keeweb/alpine-base
9+
# https://hub.docker.com/repository/docker/keeweb/keeweb
10+
# https://hub.docker.com/repository/docker/keeweb/alpine-base
11+
#
12+
# this script installs the keeweb plugins from https://github.com/keeweb/keeweb-plugins/
13+
# #
14+
15+
PLUGINS_PATH="/config/www/plugins"
16+
17+
# #
18+
# Plugins > Start
19+
# #
20+
21+
echo -e " Loader : Checking keeweb-plugins"
22+
23+
# #
24+
# Plugins > Install
25+
# #
26+
27+
if [ ! -d ${PLUGINS_PATH} ]; then
28+
curl -Ss -L https://github.com/keeweb/keeweb-plugins/archive/master.zip >> /config/www/master.zip
29+
unzip -qq /config/www/master.zip -d /config/www/
30+
rm /config/www/master.zip
31+
mkdir -p ${PLUGINS_PATH}
32+
cp -R /config/www/keeweb-plugins-master/docs/plugins/* ${PLUGINS_PATH}
33+
rm -rf /config/www/keeweb-plugins-master
34+
35+
echo -e " Loader : Installed keeweb-plugins to ${PLUGINS_PATH}"
36+
else
37+
echo -e " Loader : keeweb-plugins already installed in ${PLUGINS_PATH}; skipping"
38+
fi;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
-----BEGIN DH PARAMETERS-----
2+
MIICCAKCAgEA//////////+t+FRYortKmq/cViAnPTzx2LnFg84tNpWp4TZBFGQz
3+
+8yTnc4kmz75fS/jY2MMddj2gbICrsRhetPfHtXV/WVhJDP1H18GbtCFY2VVPe0a
4+
87VXE15/V8k1mE8McODmi3fipona8+/och3xWKE2rec1MKzKT0g6eXq8CrGCsyT7
5+
YdEIqUuyyOP7uWrat2DX9GgdT0Kj3jlN9K5W7edjcrsZCwenyO4KbXCeAvzhzffi
6+
7MA0BM0oNC9hkXL+nOmFg/+OTxIy7vKBg8P+OxtMb61zO7X8vC7CIAXFjvGDfRaD
7+
ssbzSibBsu/6iGtCOGEfz9zeNVs7ZRkDW7w09N75nAI4YbRvydbmyQd62R0mkff3
8+
7lmMsPrBhtkcrv4TCYUTknC0EwyTvEN5RPT9RFLi103TZPLiHnH1S/9croKrnJ32
9+
nuhtK8UiNjoNq8Uhl5sN6todv5pC1cRITgq80Gv6U93vPBsg7j/VnXwl5B0rZp4e
10+
8W5vUsMWTfT7eTDp5OWIV7asfV9C1p9tGHdjzx1VA0AEh/VbpX4xzHpxNciG77Qx
11+
iu1qHgEtnmgyqQdgCpGBMMRtx3j5ca0AOAkpmaMzy4t6Gh25PXFAADwqTs6p+Y0K
12+
zAqCkc3OyX3Pjsm1Wn+IpGtNtahR9EGC4caKAH5eZV9q//////////8CAQI=
13+
-----END DH PARAMETERS-----
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# #
2+
# @project keeweb
3+
# @usage Nginx site-configs default configuration file
4+
# @file /root/defaults/nginx/nginx.conf.sample
5+
# @repo https://github.com/keeweb/keeweb
6+
# https://github.com/keeweb/alpine-base
7+
# https://hub.docker.com/repository/docker/keeweb/keeweb
8+
# https://hub.docker.com/repository/docker/keeweb/alpine-base
9+
# #
10+
11+
user keeweb;
12+
13+
# Set number of worker processes automatically based on number of CPU cores.
14+
include /config/nginx/worker_processes.conf;
15+
16+
# Enables the use of JIT for regular expressions to speed-up their processing.
17+
pcre_jit on;
18+
19+
# Configures default error logger.
20+
error_log /config/log/nginx/error.log;
21+
22+
# Includes files with directives to load dynamic modules.
23+
include /etc/nginx/modules/*.conf;
24+
25+
# Include files with config snippets into the root context.
26+
include /etc/nginx/conf.d/*.conf;
27+
28+
events
29+
{
30+
# The maximum number of simultaneous connections that can be opened by
31+
# a worker process.
32+
worker_connections 1024;
33+
}
34+
35+
http
36+
{
37+
# Includes mapping of file name extensions to MIME types of responses
38+
# and defines the default type.
39+
include /etc/nginx/mime.types;
40+
default_type application/octet-stream;
41+
42+
# Name servers used to resolve names of upstream servers into addresses.
43+
# It's also needed when using tcpsocket and udpsocket in Lua modules.
44+
# resolver 1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001;
45+
include /config/nginx/resolver.conf;
46+
47+
# Don't tell nginx version to the clients. Default is 'on'.
48+
server_tokens off;
49+
50+
# Specifies the maximum accepted body size of a client request, as
51+
# indicated by the request header Content-Length. If the stated content
52+
# length is greater than this size, then the client receives the HTTP
53+
# error code 413. Set to 0 to disable. Default is '1m'.
54+
client_max_body_size 0;
55+
56+
# Sendfile copies data between one FD and other from within the kernel,
57+
# which is more efficient than read() + write(). Default is off.
58+
sendfile on;
59+
60+
# Causes nginx to attempt to send its HTTP response head in one packet,
61+
# instead of using partial frames. Default is 'off'.
62+
tcp_nopush on;
63+
64+
# all ssl related config moved to ssl.conf
65+
# included in server blocks where listen 443 is defined
66+
67+
# Enable gzipping of responses.
68+
# gzip on;
69+
70+
# Set the Vary HTTP header as defined in the RFC 2616. Default is 'off'.
71+
gzip_vary on;
72+
73+
# Helper variable for proxying websockets.
74+
map $http_upgrade $connection_upgrade
75+
{
76+
default upgrade;
77+
'' close;
78+
}
79+
80+
# Enable http2 by default for all servers
81+
http2 on;
82+
83+
# Sets the path, format, and configuration for a buffered log write.
84+
access_log /config/log/nginx/access.log;
85+
86+
# Includes virtual hosts configs.
87+
include /etc/nginx/http.d/*.conf;
88+
include /config/nginx/site-confs/*.conf;
89+
}
90+
91+
daemon off;
92+
pid /run/nginx.pid;

0 commit comments

Comments
 (0)