配置变化: docker-compose.yml
parent
885156dfb4
commit
f6115753f8
|
@ -1,4 +1,5 @@
|
|||
#!/bin/bash
|
||||
# python manage.py makemigrations
|
||||
# python manage.py migrate
|
||||
# python manage.py init -y
|
||||
daphne -b 0.0.0.0 -p 8000 application.asgi:application
|
||||
daphne -b 0.0.0.0 -p 8000 application.asgi:application
|
||||
|
|
|
@ -91,6 +91,27 @@ services:
|
|||
# network:
|
||||
# ipv4_address: 177.8.0.14
|
||||
|
||||
|
||||
dvadmin-redis:
|
||||
image: redis:6.2.6-alpine # 指定服务镜像,最好是与之前下载的redis配置文件保持一致
|
||||
container_name: dvadmin-redis # 容器名称
|
||||
restart: on-failure # 重启方式
|
||||
environment:
|
||||
- TZ=Asia/Shanghai # 设置时区
|
||||
volumes: # 配置数据卷
|
||||
- ./docker_env/redis/data:/data
|
||||
- ./docker_env/redis/redis.conf:/etc/redis/redis.conf
|
||||
ports: # 映射端口
|
||||
- "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" # 指定配置文件并开启持久化
|
||||
privileged: true # 使用该参数,container内的root拥有真正的root权限。否则,container内的root只是外部的一个普通用户权限
|
||||
networks:
|
||||
network:
|
||||
ipv4_address: 177.8.0.15
|
||||
|
||||
|
||||
networks:
|
||||
network:
|
||||
ipam:
|
||||
|
|
Loading…
Reference in New Issue