Github中下载对应版本
bashmv docker-compose-linux-x86_64 /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose #添加可执行权限
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose #软链接
根据官网链接参考和下载源文件 更改参考
yamlversion: '3.9'
services:
passbolt:
image: passbolt/passbolt:latest-ce
restart: unless-stopped
environment:
APP_FULL_BASE_URL: http://passbolt.hwtc.net
DATASOURCES_DEFAULT_HOST: "database-ip"
DATASOURCES_DEFAULT_USERNAME: "database-username"
DATASOURCES_DEFAULT_PASSWORD: "passwd"
DATASOURCES_DEFAULT_DATABASE: "passbolt"
EMAIL_DEFAULT_FROM: "passbolt@domain.net"
EMAIL_TRANSPORT_DEFAULT_HOST: "smtphz.qiye.163.com"
EMAIL_TRANSPORT_DEFAULT_PORT: 465
EMAIL_TRANSPORT_DEFAULT_USERNAME: "mail@domain.net"
EMAIL_TRANSPORT_DEFAULT_PASSWORD: "passwd"
EMAIL_TRANSPORT_DEFAULT_TLS: false
volumes:
- gpg_volume:/etc/passbolt/gpg
- jwt_volume:/etc/passbolt/jwt
command: ["/usr/bin/wait-for.sh", "-t", "0", "database-ip:3306", "--", "/docker-entrypoint.sh"]
ports:
- 80:80
- 443:443
volumes:
gpg_volume:
jwt_volume:
镜像部署完毕后运行命令进行管理员创建
bashdocker exec containerID su -m -c "/usr/share/php/passbolt/bin/cake \
passbolt register_user \
-u mingquanz@domain.net \
-f not -l good -r admin" -s /bin/sh www-data
Ps:注意需要进行域名解析,直接使用IP地址进行访问会因为跨域问题无法访问