mirror of
https://github.com/PlayEdu/docker-compose.git
synced 2025-06-06 14:54:08 +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_API_PORT=9700
|
||||
PLAYEDU_PC_PORT=9800
|
||||
PLAYEDU_ADMIN_PORT=9900
|
||||
PLAYEDU_MINIO_ENDPOINT=http://127.0.0.1:9000
|
||||
PLAYEDU_MINIO_DOMAIN=http://127.0.0.1:50000
|
||||
PLAYEDU_JWT_KEY=playeduxyz
|
||||
|
||||
################# MySQL ###################
|
||||
MYSQL_HOST=mysql
|
||||
MYSQL_PORT=3306
|
||||
MYSQL_DATABASE=playedu
|
||||
MYSQL_USER=root
|
||||
MYSQL_ROOT_PASSWORD=playedu-root-password
|
||||
MYSQL_PORT=33063
|
||||
|
||||
################# Redis ###################
|
||||
REDIS_HOST=redis
|
||||
REDIS_PASS=(null)
|
||||
REDIS_PORT=6379
|
||||
REDIS_PORT=16379
|
||||
|
||||
################# MINIO ###################
|
||||
MINIO_ACCESS_KEY=playedu
|
||||
MINIO_SECRET_KEY=playedu-password
|
||||
MINIO_PORT=9000
|
||||
MINIO_CONSOLE_PORT=50000
|
||||
MINIO_BUCKET=playedu
|
||||
MINIO_ROOT_USER=username
|
||||
MINIO_ROOT_PASSWORD=password
|
||||
MINIO_PORT=9002
|
||||
MINIO_CONSOLE_PORT=50002
|
||||
MINIO_BUCKETS=playedu:public
|
||||
|
@ -8,40 +8,39 @@ x-logging: &default-logging
|
||||
|
||||
networks:
|
||||
backend:
|
||||
driver: ${NETWORKS_DRIVER}
|
||||
ipam:
|
||||
driver: default
|
||||
config:
|
||||
- subnet: 172.10.10.0/24
|
||||
driver: bridge
|
||||
# ipam:
|
||||
# driver: default
|
||||
# config:
|
||||
# - subnet: 172.10.10.0/24
|
||||
|
||||
volumes:
|
||||
mysql:
|
||||
driver: ${VOLUMES_DRIVER}
|
||||
driver: local
|
||||
redis:
|
||||
driver: ${VOLUMES_DRIVER}
|
||||
driver: local
|
||||
minio:
|
||||
driver: local
|
||||
|
||||
services:
|
||||
### 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
|
||||
volumes:
|
||||
- ${DATA_PATH}/logs/nginx:/var/log/nginx
|
||||
- ./data/logs/nginx:/var/log/nginx
|
||||
environment:
|
||||
- DB_HOST=${MYSQL_HOST:-mysql}
|
||||
- DB_PORT=${MYSQL_PORT:-3306}
|
||||
- DB_DATABASE=${MYSQL_DATABASE:-playedu}
|
||||
- DB_USERNAME=${MYSQL_USER:-root}
|
||||
- DB_PASSWORD=${MYSQL_ROOT_PASSWORD:-playedu-root-password}
|
||||
- REDIS_HOST=${REDIS_HOST:-redis}
|
||||
- REDIS_AUTH=${REDIS_PASS:-(null)}
|
||||
- REDIS_PORT=${REDIS_PORT:-6379}
|
||||
- MINIO_USER=${MINIO_ROOT_USER:-playedu}
|
||||
- MINIO_PASS=${MINIO_ROOT_PASSWORD:-playedu-password}
|
||||
- MINIO_END_POINT=${PLAYEDU_MINIO_ENDPOINT}
|
||||
- MINIO_BUCKET=${MINIO_BUCKET:-playedu}
|
||||
- MINIO_DOMAIN=${PLAYEDU_MINIO_DOMAIN}
|
||||
- DB_HOST=mysql
|
||||
- DB_PORT=3306
|
||||
- DB_NAME=playedu
|
||||
- DB_USER=root
|
||||
- DB_PASS=playeduxyz
|
||||
- REDIS_HOST=redis
|
||||
- REDIS_PASS=playeduxyz
|
||||
- REDIS_PORT=6379
|
||||
- SA_TOKEN_JWT_SECRET_KEY=${PLAYEDU_JWT_KEY:-playeduxyz}
|
||||
ports:
|
||||
- "${PLAYEDU_API_PORT:-9700}:80"
|
||||
- "${PLAYEDU_PC_PORT:-9800}:9800"
|
||||
- "${PLAYEDU_ADMIN_PORT:-9900}:9900"
|
||||
networks:
|
||||
@ -49,6 +48,7 @@ services:
|
||||
depends_on:
|
||||
- mysql
|
||||
- redis
|
||||
- minio
|
||||
logging: *default-logging
|
||||
|
||||
### Redis ################################################
|
||||
@ -56,7 +56,7 @@ services:
|
||||
build: ./redis
|
||||
restart: always
|
||||
volumes:
|
||||
- ${DATA_PATH}/redis:/data
|
||||
- ./data/redis:/data
|
||||
ports:
|
||||
- "${REDIS_PORT:-6379}:6379"
|
||||
networks:
|
||||
@ -65,36 +65,33 @@ services:
|
||||
|
||||
### MySQL ################################################
|
||||
mysql:
|
||||
build:
|
||||
context: ./mysql
|
||||
build: ./mysql
|
||||
restart: always
|
||||
environment:
|
||||
- MYSQL_DATABASE=${MYSQL_DATABASE:-playedu}
|
||||
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-playedu-root-password}
|
||||
- TZ=${TIMEZONE}
|
||||
- MYSQL_DATABASE=playedu
|
||||
- MYSQL_ROOT_PASSWORD=playeduxyz
|
||||
- TZ=UTC
|
||||
volumes:
|
||||
- ${DATA_PATH}/mysql:/var/lib/mysql
|
||||
- ./data/mysql:/var/lib/mysql
|
||||
ports:
|
||||
- "${MYSQL_PORT:-3306}:3306"
|
||||
networks:
|
||||
- backend
|
||||
logging: *default-logging
|
||||
|
||||
|
||||
### Minio ################################################
|
||||
minio:
|
||||
build:
|
||||
context: ./minio
|
||||
image: bitnami/minio:latest
|
||||
restart: always
|
||||
environment:
|
||||
- MINIO_ROOT_USER=${MINIO_ROOT_USER:-playedu}
|
||||
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD:-playedu-password}
|
||||
- MINIO_ROOT_USER=${MINIO_ROOT_USER:-username}
|
||||
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD:-password}
|
||||
- MINIO_DEFAULT_BUCKETS=${MINIO_BUCKET:-playedu:public}
|
||||
volumes:
|
||||
- ${DATA_PATH}/minio/data:/data
|
||||
- ${DATA_PATH}/minio/config:/root/.minio
|
||||
- ./data/minio/data:/data
|
||||
ports:
|
||||
- "${MINIO_PORT:-9000}:9000"
|
||||
- "${MINIO_CONSOLE_PORT:-50000}:50000"
|
||||
- "${MINIO_CONSOLE_PORT:-9001}:9001"
|
||||
networks:
|
||||
- backend
|
||||
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>"
|
||||
|
||||
# 时区配置
|
||||
ARG TZ=UTC
|
||||
ENV TZ ${TIMEZONE}
|
||||
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 docker-entrypoint-initdb.d /docker-entrypoint-initdb.d
|
||||
|
||||
# my.cnf只读权限
|
||||
RUN chmod 0444 /etc/mysql/conf.d/my.cnf
|
||||
|
||||
CMD ["mysqld"]
|
||||
|
||||
# 暴露3306端口
|
||||
EXPOSE 3306
|
||||
|
||||
# 启动mysql
|
||||
CMD ["mysqld"]
|
||||
|
@ -2,12 +2,10 @@ FROM redis:7.0.2
|
||||
|
||||
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
|
||||
|
||||
VOLUME /data
|
||||
|
||||
EXPOSE 6379
|
||||
|
||||
CMD ["redis-server", "/usr/local/etc/redis/redis.conf"]
|
||||
CMD ["redis-server", "/usr/local/etc/redis/redis.conf"]
|
@ -504,7 +504,7 @@ replica-priority 100
|
||||
# 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.
|
||||
#
|
||||
# requirepass foobared
|
||||
requirepass playeduxyz
|
||||
|
||||
# Command renaming.
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user