# docker-local **Repository Path**: rdisme/docker-local ## Basic Information - **Project Name**: docker-local - **Description**: docker 本地开发环境 - **Primary Language**: Unknown - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-07-23 - **Last Updated**: 2024-10-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # docker-local > 本地开发环境 ## 开发须知 - 启动服务 ``` docker-compose up -d nginx mysql ...<选择你需要的服务> ``` ## 服务介绍 ### Docker dockerfile 和 docker-compose 对应写法 ``` stdin_open: true # docker run -i tty: true # docker run -t ``` ### Nginx 配置文件更新之后软重启 ``` docker exec -it nginx nginx -s reload ``` ### MYSQL 配置文件挂载至容器,没有生效,有可能是因为配置文件权限的问题,只需要把权限更新一下即可 ### ELK > es数据库更新用户密码,进入es容器中执行如下命令 ``` elasticsearch-setup-passwords interactive ``` > 完成设置之后,再启动其他相关容器 ### neo4j > 默认账号密码 neo4j/neo4j \ > 数据备份:只需要备份data目录中neo4j的数据 ### active mq 示例:https://github.com/dejanb/stomp-php/tree/master/examples > 默认账号:admin admin ### rabbit mq > 默认账号:rabbitmq rabbitmq ### svn > 只有仓库是挂载到本地,删除容器会丢失svnadmin相关的数据 \ > https://github.com/elleFlorio/svn-docker \ > https://blog.csdn.net/qq_25568881/article/details/103753005 ### svnadmin web ``` Subversion authorization file: /etc/subversion/subversion-access-control User authentication file (SVNUserFile):/etc/subversion/passwd Parent directory of the repositories (SVNParentPath):/home/svn Subversion client executable:/usr/bin/svn Subversion admin executable:/usr/bin/svnadmin ``` ### GitBucket https://github.com/gitbucket/gitbucket > 默认用户:root/root ### GitLab https://hub.docker.com/r/gitlab/gitlab-ce > 默认用户 root 密码:在启动容器之后,会在 services/gitlab 中生成一个时效24h的文件initial_root_password,密码就在这里 ### Redmine https://hub.docker.com/_/redmine > 默认用户 admin/admin , 使用MySQL需要确保使用的数据库(默认库名:redmine)已经创建 ### Certbot https://hub.docker.com/r/certbot/certbot > nginx 证书管理,脚本限制在域名解析的ip服务器上,且不支持申请泛域名证书 - 申请证书 (certbot.yml中指定待申请域名) ``` docker compose -f certbot.yml up -d create ``` - 续费 (定时任务定期执行) ``` ./shell/certbot.sh ``` ### Acme.sh https://github.com/acmesh-official/acme.sh > nginx 证书管理 \ > 需要保持容器一直运行,容器内有续费机制,不需要额外设置定时任务 \ > 支持申请泛域名证书,不限制域名和服务器位置关系 \ > 需要配置 dns api 所有参数 https://github.com/acmesh-official/acme.sh/wiki/%E8%AF%B4%E6%98%8E - 申请、安装证书 ``` ./shell/acme.sh.sh issue www.example.com ./shell/acme.sh.sh install www.example.com ``` - 常用命令 - - 列出所有已经申请的证书信息 `acme.sh --list`