add keeweb
This commit is contained in:
32
misc/images/keeweb/containers/Dockerfile
Executable file
32
misc/images/keeweb/containers/Dockerfile
Executable file
@ -0,0 +1,32 @@
|
||||
FROM reg.cadoles.com/envole/nineapache:8.2
|
||||
|
||||
USER root
|
||||
|
||||
# Installe Node.js + npm
|
||||
RUN apk add --no-cache nodejs npm
|
||||
|
||||
# Crée le dossier de l'app
|
||||
WORKDIR /app
|
||||
|
||||
# Installe webdav-server localement (dans /app/node_modules)
|
||||
RUN npm install webdav-server@2
|
||||
|
||||
# Copie ton script WebDAV dans /app
|
||||
COPY webdav.js /app/webdav.js
|
||||
|
||||
# Installe KeeWeb
|
||||
RUN curl -L https://github.com/keeweb/keeweb/releases/download/v1.18.7/KeeWeb-1.18.7.html.zip -o /tmp/keeweb.zip \
|
||||
&& unzip /tmp/keeweb.zip -d /app/public \
|
||||
&& sed -i 's|<base href="/"|<base href="/keeweb/"|' /app/public/index.html \
|
||||
&& mv /app/public/index.html /app/public/index.php
|
||||
|
||||
# Crée le dossier de stockage
|
||||
RUN mkdir -p /data && chown apache:apache /data
|
||||
|
||||
# Copie la conf Apache
|
||||
COPY apache.conf /etc/apache2/conf.d/zapp.conf
|
||||
|
||||
# Démarre Apache + WebDAV
|
||||
USER apache
|
||||
ENV NODE_PATH=/app/node_modules
|
||||
CMD sh -c "node /app/webdav.js & httpd -D FOREGROUND"
|
16
misc/images/keeweb/containers/apache.conf
Normal file
16
misc/images/keeweb/containers/apache.conf
Normal file
@ -0,0 +1,16 @@
|
||||
ServerName nineapache.local
|
||||
DocumentRoot "/app/public"
|
||||
|
||||
Alias /keeweb /app/public
|
||||
|
||||
<Location "/keeweb/webdav">
|
||||
ProxyPass http://127.0.0.1:9999/
|
||||
ProxyPassReverse http://127.0.0.1:9999/
|
||||
</Location>
|
||||
|
||||
<Directory "/app/public">
|
||||
Options FollowSymLinks
|
||||
AllowOverride Limit Options FileInfo
|
||||
DirectoryIndex index.php
|
||||
Require all granted
|
||||
</Directory>
|
21
misc/images/keeweb/containers/webdav.js
Normal file
21
misc/images/keeweb/containers/webdav.js
Normal file
@ -0,0 +1,21 @@
|
||||
const webdav = require('webdav-server').v2;
|
||||
|
||||
const adminUser = process.env.WEBDAV_USER || 'admin';
|
||||
const adminPass = process.env.WEBDAV_PASS || 'password';
|
||||
|
||||
const userManager = new webdav.SimpleUserManager();
|
||||
const user = userManager.addUser(adminUser, adminPass, false); // false = pas admin système
|
||||
|
||||
const privilegeManager = new webdav.SimplePathPrivilegeManager();
|
||||
|
||||
const server = new webdav.WebDAVServer({
|
||||
port: 9999,
|
||||
hostname: '0.0.0.0',
|
||||
httpAuthentication: new webdav.HTTPBasicAuthentication(userManager, 'default realm'),
|
||||
privilegeManager,
|
||||
rootFileSystem: new webdav.PhysicalFileSystem('/data')
|
||||
});
|
||||
|
||||
server.start(() => {
|
||||
console.log(`WebDAV server running at http://0.0.0.0:9999 as ${adminUser}`);
|
||||
});
|
14
misc/images/keeweb/docker-compose.yml
Executable file
14
misc/images/keeweb/docker-compose.yml
Executable file
@ -0,0 +1,14 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
keeweb:
|
||||
build:
|
||||
context: ./containers
|
||||
image: reg.cadoles.com/envole/keeweb
|
||||
container_name: keeweb
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
environment:
|
||||
WEBDAV_USER: tonuser
|
||||
WEBDAV_PASS: tonpassword
|
0
misc/images/keeweb/init.kdbx
Normal file
0
misc/images/keeweb/init.kdbx
Normal file
Reference in New Issue
Block a user