diff --git a/doc/IMPORTING.md b/doc/IMPORTING.md index bfda51649..6ca405d1e 100644 --- a/doc/IMPORTING.md +++ b/doc/IMPORTING.md @@ -44,6 +44,21 @@ services: MYSQL_PASSWORD: "password123" volumes: - ./data/mysql:/var/lib/mysql + letsencrypt: + image: adferrand/letsencrypt-dns + container_name: "letsencrypt-dns" + env_file: .env + volumes: + - "$ROOT/domains.conf:/etc/letsencrypt/domains.conf" + - "$ROOT/certs/:/etc/letsencrypt" + environment: + - VERSION=latest + - "LETSENCRYPT_USER_MAIL=$EMAIL" + - "LEXICON_PROVIDER=$PROVIDER" + - "LEXICON_PROVIDER_OPTIONS=$PROVIDER_OPTIONS" + - "CERTS_DIRS_MODE=$DIRS_MODE" + - "CERTS_FILES_MODE=$FILES_MODE" + restart: always ``` After you start the stack, the import will begin just after database initialize. diff --git a/doc/example/.env b/doc/example/.env new file mode 100644 index 000000000..cc81b29c2 --- /dev/null +++ b/doc/example/.env @@ -0,0 +1,23 @@ + +################################### +# Letsencrypt-DNS configuration file +# Update info on lines 11 and 17 +################################### + +# Set this to the path where Letsencrypt-DNS data and configuration is stored +ROOT=./letsencrypt-dns + +# Letsencrypt email address +EMAIL=letsencrypt@example.com + +# Lexicon provider +PROVIDER=cloudflare + +# Provider options +PROVIDER_OPTIONS=--auth-username=my_cloudflare_email --auth-token=my_cloudflare_global_api_key + +# Certificate directory mode +DIRS_MODE=0750 + +# Certificate files mode +FILES_MODE=0640 diff --git a/doc/example/docker-compose.yml b/doc/example/docker-compose.yml index e6707b957..3c0d70134 100644 --- a/doc/example/docker-compose.yml +++ b/doc/example/docker-compose.yml @@ -26,3 +26,19 @@ services: MYSQL_PASSWORD: "npm" volumes: - ./data/mysql:/var/lib/mysql +#LETSENCRYPT CLOUDFLARE DNS CHALLANGE + letsencrypt: + image: adferrand/letsencrypt-dns + container_name: "letsencrypt-dns" + env_file: .env + volumes: + - "$ROOT/domains.conf:/etc/letsencrypt/domains.conf" + - "$ROOT/certs/:/etc/letsencrypt" + environment: + - VERSION=latest + - "LETSENCRYPT_USER_MAIL=$EMAIL" + - "LEXICON_PROVIDER=$PROVIDER" + - "LEXICON_PROVIDER_OPTIONS=$PROVIDER_OPTIONS" + - "CERTS_DIRS_MODE=$DIRS_MODE" + - "CERTS_FILES_MODE=$FILES_MODE" + restart: always diff --git a/doc/example/letsencrypt-dns/domains.conf b/doc/example/letsencrypt-dns/domains.conf new file mode 100644 index 000000000..6e714f108 --- /dev/null +++ b/doc/example/letsencrypt-dns/domains.conf @@ -0,0 +1,2 @@ +### Replace with your domain ### +*.example.com example.com