Ajout de cfssl
This commit is contained in:
parent
4fcc3a0c74
commit
41a26e9542
2 changed files with 24 additions and 0 deletions
15
cfssl/entrypoint.sh
Normal file
15
cfssl/entrypoint.sh
Normal file
|
@ -0,0 +1,15 @@
|
|||
#! /bin/bash
|
||||
|
||||
if [ ! -f csr_server.json ] || [ ! -f config_server.json ]; then
|
||||
echo "no csr_server.json or config_server.json detected!";
|
||||
fi;
|
||||
while [ ! -f csr_server.json ] || [ ! -f config_server.json ]; do
|
||||
sleep 1;
|
||||
done;
|
||||
|
||||
if [ ! -f ca-key.pem ]
|
||||
then
|
||||
cfssl genkey -initca=true csr_server.json | cfssljson -bare ca;
|
||||
fi
|
||||
|
||||
cfssl serve -address=0.0.0.0 -ca-key ca-key.pem -ca ca.pem -config config_server.json
|
|
@ -18,6 +18,7 @@ services:
|
|||
restart: always
|
||||
volumes:
|
||||
- nextcloud:/var/www/html
|
||||
- ./cfssl:/cfssl
|
||||
environment:
|
||||
- POSTGRES_HOST=db
|
||||
- REDIS_HOST=redis
|
||||
|
@ -81,6 +82,14 @@ services:
|
|||
- proxy-tier
|
||||
depends_on:
|
||||
- proxy
|
||||
cfssl:
|
||||
image: cfssl/cfssl
|
||||
volumes:
|
||||
- ./cfssl:/cfssl
|
||||
working_dir: /cfssl
|
||||
entrypoint: /bin/bash
|
||||
command:
|
||||
- /cfssl/entrypoint.sh
|
||||
volumes:
|
||||
db:
|
||||
nextcloud:
|
||||
|
|
Loading…
Reference in a new issue