From 89b2d71078c8a90c8b8859dca0d01d0c76431aff Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Fri, 27 Aug 2021 14:15:37 +0800 Subject: [PATCH] :tada:first commit --- .idea/.gitignore | 8 ++++ .idea/deploy.stack.iml | 9 ++++ .idea/modules.xml | 8 ++++ base/mongo.stack.yaml | 20 ++++++++ dev-dbs/dbs.stack.yaml | 65 ++++++++++++++++++++++++++ portainer-ce/portainer-agent-stack.yml | 38 +++++++++++++++ portainer-ce/portainer-ce.yaml | 14 ++++++ 7 files changed, 162 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/deploy.stack.iml create mode 100644 .idea/modules.xml create mode 100644 base/mongo.stack.yaml create mode 100644 dev-dbs/dbs.stack.yaml create mode 100644 portainer-ce/portainer-agent-stack.yml create mode 100644 portainer-ce/portainer-ce.yaml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..081b737 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 数据源本地存储已忽略文件 +/dataSources/ +/dataSources.local.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ diff --git a/.idea/deploy.stack.iml b/.idea/deploy.stack.iml new file mode 100644 index 0000000..5e764c4 --- /dev/null +++ b/.idea/deploy.stack.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..cefd356 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/base/mongo.stack.yaml b/base/mongo.stack.yaml new file mode 100644 index 0000000..d085797 --- /dev/null +++ b/base/mongo.stack.yaml @@ -0,0 +1,20 @@ +version: '3.8' +services: + + mongo: + image: hub.node:3500/mongo:4.4 + container_name: dev-mongo + restart: always + ports: + - 27017:27017 + volumes: + - mongo_config:/data/configdb + - mongo_data:/data/db + environment: + - MONGO_INITDB_ROOT_USERNAME=mongoadmin + - MONGO_INITDB_ROOT_PASSWORD=mongopassword + command: --wiredTigerCacheSizeGB 1.5 + +volumes: + mongo_config: + mongo_data: diff --git a/dev-dbs/dbs.stack.yaml b/dev-dbs/dbs.stack.yaml new file mode 100644 index 0000000..e7f3f3a --- /dev/null +++ b/dev-dbs/dbs.stack.yaml @@ -0,0 +1,65 @@ +version: '3.8' +services: + + mongo4.4: + image: hub.node:3500/mongo:4.4 + container_name: "Dev-mongo4.4" + restart: always + ports: + - 27017:27017 + volumes: + - mongo_config:/data/configdb + - mongo_data:/data/db + environment: + - MONGO_INITDB_ROOT_USERNAME=mongoadmin + - MONGO_INITDB_ROOT_PASSWORD=mongopassword + command: --wiredTigerCacheSizeGB 1.5 + networks: + dbs-net: + ipv4_address: 172.25.0.219 + + redis5: + image: hub.node:3500/redis:5-alpine + container_name: "Dev-redis5" + restart: always + command: "--requirepass redispassword" + volumes: + - redis_data:/data + networks: + dbs-net: + ipv4_address: 172.25.0.209 + ports: + - "6379:6379" + + mysql8: + image: hub.node:3500/percona:8 + container_name: "Dev-percona8" + restart: always + environment: + - MYSQL_ROOT_PASSWORD=Daifa#Dev2020 + volumes: + - mysql8_data:/var/lib/mysql + - mysql8_logs:/var/log/mysql + - ~/mydata/configs/mysql8/my.cnf:/etc/my.cnf + networks: + dbs-net: + ipv4_address: 172.25.0.251 + ports: + - "3306:3306" + +volumes: + mongo_config: + mongo_data: + redis_data: + mysql8_data: + mysql8_logs: + + +networks: + dbs-net: + name: dbs-net + driver: bridge + ipam: + driver: default + config: + - subnet: 172.25.0.0/24 \ No newline at end of file diff --git a/portainer-ce/portainer-agent-stack.yml b/portainer-ce/portainer-agent-stack.yml new file mode 100644 index 0000000..2acc111 --- /dev/null +++ b/portainer-ce/portainer-agent-stack.yml @@ -0,0 +1,38 @@ +version: '3.2' + +services: + agent: + image: portainer/agent + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - /var/lib/docker/volumes:/var/lib/docker/volumes + networks: + - agent_network + deploy: + mode: global + placement: + constraints: [node.platform.os == linux] + + portainer: + image: portainer/portainer-ce + command: -H tcp://tasks.agent:9001 --tlsskipverify + ports: + - "9000:9000" + - "8000:8000" + volumes: + - portainer_data:/data + networks: + - agent_network + deploy: + mode: replicated + replicas: 1 + placement: + constraints: [node.role == manager] + +networks: + agent_network: + driver: overlay + attachable: true + +volumes: + portainer_data: diff --git a/portainer-ce/portainer-ce.yaml b/portainer-ce/portainer-ce.yaml new file mode 100644 index 0000000..e4b7fbf --- /dev/null +++ b/portainer-ce/portainer-ce.yaml @@ -0,0 +1,14 @@ +version: '3.8' +services: + + portainer: + image: portainer/portainer-ce:alpine + restart: always + ports: + - 9000:9000 + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - portainer_data:/data + +volumes: + portainer_data: \ No newline at end of file