mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-04-24 03:04:10 +00:00
add bw-dev command to init letsencrypt certificate
This commit is contained in:
parent
606704e1ce
commit
1b25eb7d18
2 changed files with 30 additions and 0 deletions
3
bw-dev
3
bw-dev
|
@ -93,6 +93,9 @@ case "$CMD" in
|
|||
initdb)
|
||||
initdb "$@"
|
||||
;;
|
||||
init_ssl)
|
||||
$DOCKER_COMPOSE --file ./docker-compose-init_letsencrypt.yml up --exit-code-from=certbot
|
||||
;;
|
||||
resetdb)
|
||||
prod_error
|
||||
$DOCKER_COMPOSE rm -svf
|
||||
|
|
27
docker-compose-init_letsencrypt.yml
Normal file
27
docker-compose-init_letsencrypt.yml
Normal file
|
@ -0,0 +1,27 @@
|
|||
services:
|
||||
nginx:
|
||||
image: nginx:1.25.2
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
networks:
|
||||
- main
|
||||
environment:
|
||||
- DOMAIN=${DOMAIN}
|
||||
volumes:
|
||||
- ./nginx/locations:/etc/nginx/conf.d/locations
|
||||
- ./nginx/server_config:/etc/nginx/conf.d/server_config
|
||||
- ./nginx/ssl_bootstrap:/etc/nginx/templates/default.conf.template
|
||||
- ./certbot/conf:/etc/nginx/ssl
|
||||
- ./certbot/data:/var/www/certbot
|
||||
certbot:
|
||||
image: certbot/certbot:latest
|
||||
command: certonly --webroot --webroot-path=/var/www/certbot --keep-until-expiring --email ${EMAIL} --agree-tos --no-eff-email -d ${DOMAIN} -d www.${DOMAIN}
|
||||
depends_on:
|
||||
- nginx
|
||||
volumes:
|
||||
- ./certbot/conf:/etc/letsencrypt
|
||||
- ./certbot/logs:/var/log/letsencrypt
|
||||
- ./certbot/data:/var/www/certbot
|
||||
networks:
|
||||
main:
|
Loading…
Reference in a new issue