docker-compose.xml配置如下:
version: "3"
services:
mongo:
image: "mongo:latest"
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=password
growthbook:
image: "growthbook/growthbook:latest"
ports:
- "3000:3000"
- "3100:3100"
depends_on:
- mongo
environment:
- APP_ORIGIN=http://www.xxx.com:3000
- API_HOST=http://www.xxx.com:3100
- MONGODB_URI=mongodb://root:password@mongo:27017/
- JWT_SECRET=tkL9xGEIe2
- NODE_ENV=production
- ENCRYPTION_KEY=bhwcu2a91
volumes:
- uploads:/usr/local/src/app/packages/back-end/uploads
volumes:
uploads:
docker-compose up -d 启动服务之后,正常
通过域名http://www.xxx.com:3000 可以访问站点
如果想给这个docker启动的站点绑定ssl证书,实现浏览器访问https://www.xxx.com:3000
应该怎么操作呢?
https://www.cnblogs.com/Biuget-Golang/p/16838342.html 参考我的博客
https://help.aliyun.com/document_detail/98728.html 阿里云官方文档