Commit d57a73a07b31ab686777aa5eb2f1f4de2d3aba90
1 parent
2d4acced
fix: docker-compose.yml
Showing
3 changed files
with
6 additions
and
6 deletions
docker-compose.yml
| ... | ... | @@ -23,7 +23,7 @@ services: |
| 23 | 23 | |
| 24 | 24 | mysql-server: |
| 25 | 25 | container_name: mysql-server |
| 26 | - image: mysql:5.7 | |
| 26 | + image: mysql:8 | |
| 27 | 27 | build: |
| 28 | 28 | context: . |
| 29 | 29 | dockerfile: mysql-dockerfile |
| ... | ... | @@ -56,7 +56,7 @@ services: |
| 56 | 56 | context: . |
| 57 | 57 | dockerfile: redis-dockerfile |
| 58 | 58 | volumes: |
| 59 | - - /ruoyi/redis/redis.conf:/usr/local/etc/redis/redis.conf | |
| 59 | + - /ruoyi/redis/redis.conf:/etc/redis/redis.conf | |
| 60 | 60 | - /ruoyi/redis/data:/data |
| 61 | 61 | restart: always |
| 62 | 62 | ports: | ... | ... |
mysql-dockerfile
redis-dockerfile
| 1 | 1 | FROM redis:7 |
| 2 | 2 | MAINTAINER guzijian |
| 3 | -RUN echo "requirepass guzijian" >> /usr/local/etc/redis/redis.conf | |
| 3 | +RUN echo "requirepass guzijian" >> /etc/redis/redis.conf | |
| 4 | 4 | # 设置Redis快照 |
| 5 | -RUN sed -i 's/^# save ""/save 900 1\nsave 300 10\nsave 60 10000/g' /usr/local/etc/redis/redis.conf | |
| 5 | +RUN sed -i 's/^# save ""/save 900 1\nsave 300 10\nsave 60 10000/g' /etc/redis/redis.conf | |
| 6 | 6 | # 确保启动时使用容器内的配置 |
| 7 | -CMD ["redis-server", "/usr/local/etc/redis/redis.conf"] | |
| 8 | 7 | \ No newline at end of file |
| 8 | +CMD ["redis-server", "/etc/redis/redis.conf"] | |
| 9 | 9 | \ No newline at end of file | ... | ... |