mirror of
https://github.com/PlayEdu/docker-compose.git
synced 2025-06-08 06:37:51 +08:00
update
This commit is contained in:
parent
f91382f3c5
commit
904be7605c
29
.env.example
29
.env.example
@ -1,29 +1,18 @@
|
|||||||
NETWORKS_DRIVER=bridge
|
|
||||||
VOLUMES_DRIVER=local
|
|
||||||
TIMEZONE=UTC
|
|
||||||
DATA_PATH=./data
|
|
||||||
|
|
||||||
################# PlayEdu ###################
|
################# PlayEdu ###################
|
||||||
|
PLAYEDU_API_PORT=9700
|
||||||
PLAYEDU_PC_PORT=9800
|
PLAYEDU_PC_PORT=9800
|
||||||
PLAYEDU_ADMIN_PORT=9900
|
PLAYEDU_ADMIN_PORT=9900
|
||||||
PLAYEDU_MINIO_ENDPOINT=http://127.0.0.1:9000
|
PLAYEDU_JWT_KEY=playeduxyz
|
||||||
PLAYEDU_MINIO_DOMAIN=http://127.0.0.1:50000
|
|
||||||
|
|
||||||
################# MySQL ###################
|
################# MySQL ###################
|
||||||
MYSQL_HOST=mysql
|
MYSQL_PORT=33063
|
||||||
MYSQL_PORT=3306
|
|
||||||
MYSQL_DATABASE=playedu
|
|
||||||
MYSQL_USER=root
|
|
||||||
MYSQL_ROOT_PASSWORD=playedu-root-password
|
|
||||||
|
|
||||||
################# Redis ###################
|
################# Redis ###################
|
||||||
REDIS_HOST=redis
|
REDIS_PORT=16379
|
||||||
REDIS_PASS=(null)
|
|
||||||
REDIS_PORT=6379
|
|
||||||
|
|
||||||
################# MINIO ###################
|
################# MINIO ###################
|
||||||
MINIO_ACCESS_KEY=playedu
|
MINIO_ROOT_USER=username
|
||||||
MINIO_SECRET_KEY=playedu-password
|
MINIO_ROOT_PASSWORD=password
|
||||||
MINIO_PORT=9000
|
MINIO_PORT=9002
|
||||||
MINIO_CONSOLE_PORT=50000
|
MINIO_CONSOLE_PORT=50002
|
||||||
MINIO_BUCKET=playedu
|
MINIO_BUCKETS=playedu:public
|
||||||
|
@ -8,40 +8,39 @@ x-logging: &default-logging
|
|||||||
|
|
||||||
networks:
|
networks:
|
||||||
backend:
|
backend:
|
||||||
driver: ${NETWORKS_DRIVER}
|
driver: bridge
|
||||||
ipam:
|
# ipam:
|
||||||
driver: default
|
# driver: default
|
||||||
config:
|
# config:
|
||||||
- subnet: 172.10.10.0/24
|
# - subnet: 172.10.10.0/24
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
mysql:
|
mysql:
|
||||||
driver: ${VOLUMES_DRIVER}
|
driver: local
|
||||||
redis:
|
redis:
|
||||||
driver: ${VOLUMES_DRIVER}
|
driver: local
|
||||||
|
minio:
|
||||||
|
driver: local
|
||||||
|
|
||||||
services:
|
services:
|
||||||
### PlayEdu ################################################
|
### PlayEdu ################################################
|
||||||
playedu:
|
playedu:
|
||||||
image: registry.cn-hangzhou.aliyuncs.com/xiaoteng/playedu-light:1.0-beta.5
|
image: registry.cn-hangzhou.aliyuncs.com/playedu/light:1.0-beta.7
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ${DATA_PATH}/logs/nginx:/var/log/nginx
|
- ./data/logs/nginx:/var/log/nginx
|
||||||
environment:
|
environment:
|
||||||
- DB_HOST=${MYSQL_HOST:-mysql}
|
- DB_HOST=mysql
|
||||||
- DB_PORT=${MYSQL_PORT:-3306}
|
- DB_PORT=3306
|
||||||
- DB_DATABASE=${MYSQL_DATABASE:-playedu}
|
- DB_NAME=playedu
|
||||||
- DB_USERNAME=${MYSQL_USER:-root}
|
- DB_USER=root
|
||||||
- DB_PASSWORD=${MYSQL_ROOT_PASSWORD:-playedu-root-password}
|
- DB_PASS=playeduxyz
|
||||||
- REDIS_HOST=${REDIS_HOST:-redis}
|
- REDIS_HOST=redis
|
||||||
- REDIS_AUTH=${REDIS_PASS:-(null)}
|
- REDIS_PASS=playeduxyz
|
||||||
- REDIS_PORT=${REDIS_PORT:-6379}
|
- REDIS_PORT=6379
|
||||||
- MINIO_USER=${MINIO_ROOT_USER:-playedu}
|
- SA_TOKEN_JWT_SECRET_KEY=${PLAYEDU_JWT_KEY:-playeduxyz}
|
||||||
- MINIO_PASS=${MINIO_ROOT_PASSWORD:-playedu-password}
|
|
||||||
- MINIO_END_POINT=${PLAYEDU_MINIO_ENDPOINT}
|
|
||||||
- MINIO_BUCKET=${MINIO_BUCKET:-playedu}
|
|
||||||
- MINIO_DOMAIN=${PLAYEDU_MINIO_DOMAIN}
|
|
||||||
ports:
|
ports:
|
||||||
|
- "${PLAYEDU_API_PORT:-9700}:80"
|
||||||
- "${PLAYEDU_PC_PORT:-9800}:9800"
|
- "${PLAYEDU_PC_PORT:-9800}:9800"
|
||||||
- "${PLAYEDU_ADMIN_PORT:-9900}:9900"
|
- "${PLAYEDU_ADMIN_PORT:-9900}:9900"
|
||||||
networks:
|
networks:
|
||||||
@ -49,6 +48,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- mysql
|
- mysql
|
||||||
- redis
|
- redis
|
||||||
|
- minio
|
||||||
logging: *default-logging
|
logging: *default-logging
|
||||||
|
|
||||||
### Redis ################################################
|
### Redis ################################################
|
||||||
@ -56,7 +56,7 @@ services:
|
|||||||
build: ./redis
|
build: ./redis
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ${DATA_PATH}/redis:/data
|
- ./data/redis:/data
|
||||||
ports:
|
ports:
|
||||||
- "${REDIS_PORT:-6379}:6379"
|
- "${REDIS_PORT:-6379}:6379"
|
||||||
networks:
|
networks:
|
||||||
@ -65,15 +65,14 @@ services:
|
|||||||
|
|
||||||
### MySQL ################################################
|
### MySQL ################################################
|
||||||
mysql:
|
mysql:
|
||||||
build:
|
build: ./mysql
|
||||||
context: ./mysql
|
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_DATABASE=${MYSQL_DATABASE:-playedu}
|
- MYSQL_DATABASE=playedu
|
||||||
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-playedu-root-password}
|
- MYSQL_ROOT_PASSWORD=playeduxyz
|
||||||
- TZ=${TIMEZONE}
|
- TZ=UTC
|
||||||
volumes:
|
volumes:
|
||||||
- ${DATA_PATH}/mysql:/var/lib/mysql
|
- ./data/mysql:/var/lib/mysql
|
||||||
ports:
|
ports:
|
||||||
- "${MYSQL_PORT:-3306}:3306"
|
- "${MYSQL_PORT:-3306}:3306"
|
||||||
networks:
|
networks:
|
||||||
@ -82,19 +81,17 @@ services:
|
|||||||
|
|
||||||
### Minio ################################################
|
### Minio ################################################
|
||||||
minio:
|
minio:
|
||||||
build:
|
image: bitnami/minio:latest
|
||||||
context: ./minio
|
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
- MINIO_ROOT_USER=${MINIO_ROOT_USER:-playedu}
|
- MINIO_ROOT_USER=${MINIO_ROOT_USER:-username}
|
||||||
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD:-playedu-password}
|
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD:-password}
|
||||||
|
- MINIO_DEFAULT_BUCKETS=${MINIO_BUCKET:-playedu:public}
|
||||||
volumes:
|
volumes:
|
||||||
- ${DATA_PATH}/minio/data:/data
|
- ./data/minio/data:/data
|
||||||
- ${DATA_PATH}/minio/config:/root/.minio
|
|
||||||
ports:
|
ports:
|
||||||
- "${MINIO_PORT:-9000}:9000"
|
- "${MINIO_PORT:-9000}:9000"
|
||||||
- "${MINIO_CONSOLE_PORT:-50000}:50000"
|
- "${MINIO_CONSOLE_PORT:-9001}:9001"
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
logging: *default-logging
|
logging: *default-logging
|
||||||
|
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
FROM minio/minio:edge
|
|
||||||
|
|
||||||
EXPOSE 50000
|
|
||||||
|
|
||||||
CMD ["minio", "server", "/data", "--console-address", ":50000"]
|
|
@ -2,15 +2,22 @@ FROM mysql:5.7.42
|
|||||||
|
|
||||||
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
||||||
|
|
||||||
|
# 时区配置
|
||||||
ARG TZ=UTC
|
ARG TZ=UTC
|
||||||
ENV TZ ${TIMEZONE}
|
ENV TZ ${TIMEZONE}
|
||||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ >/etc/timezone && chown -R mysql:root /var/lib/mysql/
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ >/etc/timezone && chown -R mysql:root /var/lib/mysql/
|
||||||
|
|
||||||
|
# 复制自定义的my.cnf
|
||||||
COPY my.cnf /etc/mysql/conf.d/my.cnf
|
COPY my.cnf /etc/mysql/conf.d/my.cnf
|
||||||
|
|
||||||
|
# 初始化数据库
|
||||||
COPY docker-entrypoint-initdb.d /docker-entrypoint-initdb.d
|
COPY docker-entrypoint-initdb.d /docker-entrypoint-initdb.d
|
||||||
|
|
||||||
|
# my.cnf只读权限
|
||||||
RUN chmod 0444 /etc/mysql/conf.d/my.cnf
|
RUN chmod 0444 /etc/mysql/conf.d/my.cnf
|
||||||
|
|
||||||
CMD ["mysqld"]
|
# 暴露3306端口
|
||||||
|
|
||||||
EXPOSE 3306
|
EXPOSE 3306
|
||||||
|
|
||||||
|
# 启动mysql
|
||||||
|
CMD ["mysqld"]
|
||||||
|
@ -2,8 +2,6 @@ FROM redis:7.0.2
|
|||||||
|
|
||||||
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
||||||
|
|
||||||
## For security settings uncomment, make the dir, copy conf, and also start with the conf, to use it
|
|
||||||
#RUN mkdir -p /usr/local/etc/redis
|
|
||||||
COPY redis.conf /usr/local/etc/redis/redis.conf
|
COPY redis.conf /usr/local/etc/redis/redis.conf
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
@ -504,7 +504,7 @@ replica-priority 100
|
|||||||
# 150k passwords per second against a good box. This means that you should
|
# 150k passwords per second against a good box. This means that you should
|
||||||
# use a very strong password otherwise it will be very easy to break.
|
# use a very strong password otherwise it will be very easy to break.
|
||||||
#
|
#
|
||||||
# requirepass foobared
|
requirepass playeduxyz
|
||||||
|
|
||||||
# Command renaming.
|
# Command renaming.
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user