feat: 优化docker部署
This commit is contained in:
@@ -50,7 +50,7 @@ services:
|
||||
ports:
|
||||
- "3306:3306"
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: "DVADMIN3"
|
||||
MYSQL_ROOT_PASSWORD: ${MYSQL_PASSWORD}
|
||||
MYSQL_DATABASE: "django-vue3-admin"
|
||||
TZ: Asia/Shanghai
|
||||
command:
|
||||
@@ -101,7 +101,7 @@ services:
|
||||
- "6379:6379"
|
||||
sysctls: # 设置容器中的内核参数
|
||||
- net.core.somaxconn=1024
|
||||
command: /bin/sh -c "echo 'vm.overcommit_memory = 1' >> /etc/sysctl.conf && redis-server /etc/redis/redis.conf --appendonly yes --requirepass DVADMIN3" # 指定配置文件并开启持久化
|
||||
command: /bin/sh -c "echo 'vm.overcommit_memory = 1' >> /etc/sysctl.conf && redis-server /etc/redis/redis.conf --appendonly yes --requirepass ${MYSQL_PASSWORD}" # 指定配置文件并开启持久化
|
||||
privileged: true # 使用该参数,container内的root拥有真正的root权限。否则,container内的root只是外部的一个普通用户权限
|
||||
networks:
|
||||
network:
|
||||
|
||||
Reference in New Issue
Block a user