Skip to content

Commit

Permalink
deploy(docker): dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Hacker233 committed Jun 29, 2024
1 parent 1e5d0a8 commit ef4eeba
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,38 @@ services:
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./docker/certs:/etc/nginx/certs:ro
- ./docker/certs:/etc/nginx/certs:ro # 更新这里的路径
networks:
- default
- web

letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: letsencrypt-nginx-proxy-companion
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./docker/certs:/etc/nginx/certs:rw
- ./docker/certs:/etc/nginx/certs:rw # 更新这里的路径
volumes_from:
- nginx-proxy
environment:
- NGINX_PROXY_CONTAINER=nginx-proxy
- DEFAULT_EMAIL=1584775297@qq.com
networks:
- web

91huajian-web:
build:
context: .. # 你的Vue项目目录
dockerfile: docker/Dockerfile # 你的Vue项目的Dockerfile
context: .. # 指向包含docker目录的上级目录(即Vue项目根目录)
dockerfile: docker/Dockerfile # 指定docker目录下的Dockerfile
container_name: 91huajian-web-container
environment:
- VIRTUAL_HOST=91huajian.cn
- LETSENCRYPT_HOST=91huajian.cn
- LETSENCRYPT_EMAIL=1584775297@qq.com
networks:
- default

volumes:
certs:
- web
# 如果需要设置环境变量或卷,可以在这里添加

networks:
default:
external:
name: nginx-proxy
web:
external: false # 默认为false,表示如果该网络不存在,则创建它

# 如果你的项目需要静态文件或其他资源,你可能还需要添加卷映射
# 例如,如果你的Vue项目构建输出在 `dist` 目录中,你可以将它映射到nginx容器中
# volumes:
# - ../dist:/usr/share/nginx/html:ro

0 comments on commit ef4eeba

Please sign in to comment.