[BUG] Custom deploy script for using certs in other containers
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- docker, nginx, shell
- Lĩnh vực
- devops, infrastructure
Hướng nghiên cứu
The failure is in the deploy hook at /config/etc/letsencrypt/renewal-hooks/deploy/20-reload, which calls docker before the universal-docker mod has installed the binary. The container's init ordering, where mods are applied relative to the certbot renewal step, is the part to investigate. Done means the hook can run docker on the first renewal after container start. Reproducing requires a Docker environment with the mod and a forced renewal.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
I have installed swag docker with linuxserver/mods:universal-docker mod
So that I can have docker command inside swag repository, for restarting other docker services, after certificate change.
But I have found out that the mods are installed after the certificate is renewed, and after the deploy hooks have run. Therefore on swag start they would error out.
Hook will work on the next run the next month when the next renewal will start.
Expected Behavior
The mods should be installed before certificate renewal process
Steps To Reproduce
- Create custom deploy hook that is using docker command
- Change for example SUBDOMAINS so that new certificate is needed
- Observe as hook errors out with docker command not found
- Observe installation of docker mod
Environment
- OS: Debian GNU/Linux 12
- How docker service was installed: apt, docker
CPU architecture
arm64
Docker creation
services:
swag:
container_name: swag
image: lscr.io/linuxserver/swag:5.9.0
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- URL=XXX
- VALIDATION=dns
- SUBDOMAINS=X,XX,XXX #optional
# - CERTPROVIDER= #optional
- DNSPLUGIN=cloudflare #optional
# - PROPAGATION=120 #optional
- [email protected] #optional
- ONLY_SUBDOMAINS=true #optional
# - EXTRA_DOMAINS= #optional
- STAGING=false #optional
- DISABLE_F2B=true #optional
- SWAG_AUTORELOAD=true #optional
# - SWAG_AUTORELOAD_WATCHLIST= #optional
- DOCKER_MODS=linuxserver/mods:universal-docker|linuxserver/mods:swag-dashboard
volumes:
- ./config:/config
- '/var/run/docker.sock:/var/run/docker.sock'
- ./modcache:/modcache
dns:
- 1.1.1.1
networks:
vlan:
ipv4_address: X.X.X.X
restart: unless-stopped
networks:
vlan:
external: true
Container logs
These files will be updated when the certificate renews.
NEXT STEPS:
- The certificate will need to be renewed before it expires. Certbot can automatically renew the certificate in the background, but you may need to take steps to enable that functionality. See https://certbot.org/renewal-setup for instructions.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
* Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
* Donating to EFF: https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Reloading certificates
/config/etc/letsencrypt/renewal-hooks/deploy/20-reload: line 7: docker: command not found
/config/etc/letsencrypt/renewal-hooks/deploy/20-reload: line 12: docker: command not found
New certificate generated; starting nginx
The cert does not expire within the next day. Letting the cron script handle the renewal attempts.
**** Applying the SWAG dashboard mod... ****
**** installing docker and docker compose ****
Copying over docker and docker-compose binaries
**** Adding goaccess to package install list ****
**** libmaxminddb already installed, skipping ****
**** Applied the SWAG dashboard mod ****
[pkg-install-init] **** Installing all mod packages ****
(1/1) Installing goaccess (1.10.2-r0)
Executing busybox-1.37.0-r31.trigger
OK: 219.2 MiB in 219 packages
[custom-init] No custom files found, skipping...
Auto-reload: Watching the following folders for changes to .conf files:
/config/nginx
- Ngôn ngữ chính
- Dockerfile
- Star
- 3.8k
- Fork
- 274
- Merge trung bình
- 25 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của linuxserver/docker-swag
-
no-issue-activity
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
linuxserver/docker-swag#631 · 2 bình luận ·
-
[BUG] Anonymous Authelia redirects can overwrite a newer login sessionCó thể đã có người làm @MeiXu6693 đã nhận 21 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
linuxserver/docker-swag#634 · 1 bình luận ·
-
no-issue-activity
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 25/100
linuxserver/docker-swag#630 · 3 bình luận ·
-
[BUG] "chmod: changing permissions of '/XXX': Bad address" error message (QNAP)Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởbug upstream issue work-in-progress
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
linuxserver/docker-swag#514 · 75 bình luận ·
-
awaiting-approval
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
linuxserver/docker-swag#276 · 7 bình luận · 6 reaction ·
Tất cả issue của linuxserver/docker-swag
Issue tương tự
-
area: doc-engine area: infrastructure bug community-request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
snapotter-hq/SnapOtter#4834 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
soroswap/token-list#125 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement roadmap: next
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
nekko-labs/nekko-agent#2998 ·
Maintainer thường phản hồi trong vòng 1 ngày