我有一台具有以下功能的服务器docker-compose.yml
:
version: "3"
services:
frontend:
restart: unless-stopped
image: staticfloat/nginx-certbot
ports:
- 80:80/tcp
- 443:443/tcp
environment:
CERTBOT_EMAIL: [email protected]
volumes:
- ./conf.d:/etc/nginx/user.conf.d:ro
- letsencrypt:/etc/letsencrypt
studio:
image: bitnami/nginx:latest
restart: always
volumes:
- ./build:/app
- ./default.conf:/opt/bitnami/nginx/conf/server_blocks/default.conf:ro
- ./configs/config.prod.js:/app/lib/config.js
depends_on:
- frontend
volumes:
letsencrypt:
networks:
default:
external:
name: studio
此外,还有一个conf.d/prod.conf
用于 nginx 配置的文件。
我做到了docker exec -it frontend_frontend_1 /bin/bash
,我可以看到有哪些/etc/nginx/user.conf.d/prod.conf
是/etc/nginx/conf.d/prod.conf
相同的。我知道是/etc/nginx/user.conf.d/prod.conf
因为- ./conf.d:/etc/nginx/user.conf.d:ro
in才安装的docker-compose.yml
,但为什么会在那里呢/etc/nginx/conf.d/prod.conf
?
有人知道吗?