This commit is contained in:
2021-03-17 00:13:50 +01:00
commit 53855e45be
5 changed files with 49 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
.env
+17
View File
@@ -0,0 +1,17 @@
FROM python:3.9
RUN apt update
RUN apt install -y apache2-utils
RUN python3 -m pip install --upgrade radicale[bcrypt]
WORKDIR /app
COPY ./config /etc/radicale/config
COPY ./entrypoint.sh .
ENV USER_FILE=/data/users
VOLUME [ "/data" ]
CMD [ "/app/entrypoint.sh" ]
+11
View File
@@ -0,0 +1,11 @@
[server]
hosts = 0.0.0.0:5232
ssl = False
[auth]
type = htpasswd
htpasswd_filename = /data/users
htpasswd_encryption = bcrypt
[storage]
filesystem_folder = /data/data
+8
View File
@@ -0,0 +1,8 @@
version: '3.7'
services:
app:
build: .
env_file: .env
ports:
- 80:5232
Executable
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
if [ ! -f "$USER_FILE" ]; then
echo "No auth file found. Generating";
DIR=$(dirname $USER_FILE)
mkdir -p $DIR
htpasswd -bB -c $USER_FILE $USER $PASSWORD;
echo "Done";
fi
echo "Starting Server";
python -u -m radicale;