mirror of
https://github.com/cupcakearmy/docker-radicale.git
synced 2024-12-21 15:36:24 +00:00
init
This commit is contained in:
commit
53855e45be
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.env
|
17
Dockerfile
Normal file
17
Dockerfile
Normal 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
config
Normal file
11
config
Normal 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
docker-compose.yml
Normal file
8
docker-compose.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
version: '3.7'
|
||||||
|
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
build: .
|
||||||
|
env_file: .env
|
||||||
|
ports:
|
||||||
|
- 80:5232
|
12
entrypoint.sh
Executable file
12
entrypoint.sh
Executable 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;
|
Loading…
Reference in New Issue
Block a user