Skip to content

Commit

Permalink
nginx: 更新部署脚本
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryJi529 committed Jan 30, 2024
1 parent 13ad223 commit 00d6a3e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
1 change: 1 addition & 0 deletions scripts/deploy/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ services:
ports:
- "80:80"
- "443:443"
command: service cron start && nginx -g 'daemon off;'

beancount:
build:
Expand Down
4 changes: 0 additions & 4 deletions scripts/deploy/nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,3 @@ RUN echo "0 12 * * 1 root python -c 'import random; import time; time.sleep(rand
# 网站配置
COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
# COPY ./nginx/conf/*.conf /etc/nginx/conf.d/ # NOTE: 用文件夹映射更合理

# 启动脚本
COPY ./nginx/start.sh /start.sh
RUN chmod +x /start.sh
3 changes: 0 additions & 3 deletions scripts/deploy/nginx/start.sh

This file was deleted.

4 changes: 2 additions & 2 deletions scripts/fabric/fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ def update_file_with_secret():
c.run("docker exec -it morningstar_django supervisorctl start django")

colored_print("配置HTTPS...")
c.run("docker exec morningstar_nginx bash /start.sh")
# c.run('docker exec -it morningstar_nginx certbot --nginx -n --domains xxx.com')
# c.run("certbot certonly --manual --preferred-challenge dns -d django.morningstar.com") # NOTE: 手动配置
# c.run("docker exec -it morningstar_nginx certbot --nginx -n --domains xxx.com")
commandTemplate = (
"docker exec -it morningstar_nginx certbot --nginx --non-interactive"
)
Expand Down

0 comments on commit 00d6a3e

Please sign in to comment.