Skip to content

Commit

Permalink
更新 docker-compose.yml 和 appsettings.json 配置
Browse files Browse the repository at this point in the history
- 在 docker-compose.yml 中注释了 Portainer、OpenObserve、otel-collector、Postgres 和 rnacos 服务配置
- 更新了 MySQL 配置
- 更新了 Redis 配置
- 在 appsettings.json 中更新了 MySQL 和 Redis 的连接字符串,修正了密码和端口配置
  • Loading branch information
Zzzzjle committed Oct 29, 2024
1 parent 258b4c3 commit af9ad51
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 76 deletions.
148 changes: 74 additions & 74 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,52 @@ version: '3.8'

services:

portainer:
image: portainer/portainer-ce
container_name: portainer_my
restart: always
ports:
- "9000:9000"
command: -H unix:///var/run/docker.sock
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${DATA_DIR}/portainer:/opt/portainer
# portainer:
# image: portainer/portainer-ce
# container_name: portainer_my
# restart: always
# ports:
# - "9000:9000"
# command: -H unix:///var/run/docker.sock
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock
# - ${DATA_DIR}/portainer:/opt/portainer

openobserve:
container_name: openobserve
image: public.ecr.aws/zinclabs/openobserve:latest
restart: unless-stopped
environment:
ZO_ROOT_USER_EMAIL: "[email protected]"
ZO_ROOT_USER_PASSWORD: "test@123"
ports:
- "5080:5080"
- "5081:5081"
volumes:
- ${DATA_DIR}/openobserve/data:/data
# openobserve:
# container_name: openobserve
# image: public.ecr.aws/zinclabs/openobserve:latest
# restart: unless-stopped
# environment:
# ZO_ROOT_USER_EMAIL: "[email protected]"
# ZO_ROOT_USER_PASSWORD: "test@123"
# ports:
# - "5080:5080"
# - "5081:5081"
# volumes:
# - ${DATA_DIR}/openobserve/data:/data

otel-collector:
image: otel/opentelemetry-collector-contrib
restart: always
container_name: otel-collector
volumes:
- ${DATA_DIR}/otel-collector/otel-collector-config.yaml:/etc/otelcol-contrib/config.yaml
ports:
- 1888:1888 # pprof extension
- 8888:8888 # Prometheus metrics exposed by the Collector
- 8889:8889 # Prometheus exporter metrics
- 13133:13133 # health_check extension
- 4317:4317 # OTLP gRPC receiver
- 4318:4318 # OTLP http receiver
- 55679:55679 # zpages extension
# otel-collector:
# image: otel/opentelemetry-collector-contrib
# restart: always
# container_name: otel-collector
# volumes:
# - ${DATA_DIR}/otel-collector/otel-collector-config.yaml:/etc/otelcol-contrib/config.yaml
# ports:
# - 1888:1888 # pprof extension
# - 8888:8888 # Prometheus metrics exposed by the Collector
# - 8889:8889 # Prometheus exporter metrics
# - 13133:13133 # health_check extension
# - 4317:4317 # OTLP gRPC receiver
# - 4318:4318 # OTLP http receiver
# - 55679:55679 # zpages extension

rabbitmq:
container_name: rabbitmq
image: heidiks/rabbitmq-delayed-message-exchange:latest
restart: always
volumes:
- ${DATA_DIR}/rabbitmq/data:/var/lib/rabbitmq
- ${DATA_DIR}/rabbitmq/log:/var/log/rabbitmq/log
# volumes:
# - ${DATA_DIR}/rabbitmq/data:/var/lib/rabbitmq
# - ${DATA_DIR}/rabbitmq/log:/var/log/rabbitmq/log
ports:
- 4369:4369
- 25672:25672
Expand All @@ -61,54 +61,54 @@ services:
container_name: mysql
image: mysql:latest
restart: always
command: mysqld --default-authentication-plugin=mysql_native_password
command: mysqld
environment:
- MYSQL_ROOT_PASSWORD=test@123
- MYSQL_USER=admin
- MYSQL_PASS=admin@123
ports:
- '3306:3306'
volumes:
- ${DATA_DIR}/mysql/var/lib/mysql:/var/lib/mysql
- ${DATA_DIR}/mysql/my.cnf:/etc/mysql/conf.d/my.cnf
# volumes:
# - ${DATA_DIR}/mysql/var/lib/mysql:/var/lib/mysql
# - ${DATA_DIR}/mysql/my.cnf:/etc/mysql/conf.d/my.cnf

postgres:
container_name: pgsql
image: postgres:latest
restart: always
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: test@123
ports:
- 5432:5432
volumes:
- ${DATA_DIR}/pgsql/data:/var/lib/postgresql/data
# postgres:
# container_name: pgsql
# image: postgres:latest
# restart: always
# environment:
# POSTGRES_USER: root
# POSTGRES_PASSWORD: test@123
# ports:
# - 5432:5432
# volumes:
# - ${DATA_DIR}/pgsql/data:/var/lib/postgresql/data

redis:
container_name: redis
image: redis:latest
restart: always
volumes:
- ${DATA_DIR}/redis/redis.conf:/usr/local/etc/redis/redis.conf
- ${DATA_DIR}/redis/data:/data
- ${DATA_DIR}/redis/logs:/logs
# volumes:
# - ${DATA_DIR}/redis/redis.conf:/usr/local/etc/redis/redis.conf
# - ${DATA_DIR}/redis/data:/data
# - ${DATA_DIR}/redis/logs:/logs
ports:
- 6379:6379
command: /bin/bash -c "redis-server /usr/local/etc/redis/redis.conf"

rnacos:
container_name: rnacos
image: qingpan/rnacos:stable
restart: always
volumes:
- ${DATA_DIR}/nacos/io:/io:rw
ports:
- 8848:8848
- 9848:9848
- 10848:10848
environment:
- RNACOS_INIT_ADMIN_USERNAME=admin
- RNACOS_INIT_ADMIN_PASSWORD=test@123
- RNACOS_HTTP_PORT=8848
- RNACOS_GRPC_PORT=9848
- RNACOS_RAFT_NODE_ID=1
# rnacos:
# container_name: rnacos
# image: qingpan/rnacos:stable
# restart: always
# volumes:
# - ${DATA_DIR}/nacos/io:/io:rw
# ports:
# - 8848:8848
# - 9848:9848
# - 10848:10848
# environment:
# - RNACOS_INIT_ADMIN_USERNAME=admin
# - RNACOS_INIT_ADMIN_PASSWORD=test@123
# - RNACOS_HTTP_PORT=8848
# - RNACOS_GRPC_PORT=9848
# - RNACOS_RAFT_NODE_ID=1
4 changes: 2 additions & 2 deletions src/NetCorePal.D3Shop.Web/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"MySql": "Server=localhost;User ID=root;Password=123456;Database=demo;SslMode=none",
"MySql": "Server=localhost;Port=3306;User ID=root;Password=test@123;Database=demo;SslMode=none;AllowPublicKeyRetrieval=True;",
"PostgreSQL": "Host=localhost;Username=postgres;Password=123456;Database=demo",
"Redis": "localhost:6379"
"Redis": "localhost:6379,password=test@123,abortConnect=false"
},
"RabbitMQ": {
"HostName": "localhost",
Expand Down

0 comments on commit af9ad51

Please sign in to comment.