mirror of
https://gitee.com/markliu2013/docker-compose-moneynote.git
synced 2024-11-17 12:48:03 +08:00
feature
This commit is contained in:
parent
b206daa95f
commit
ee272b91c7
15
.env.example
Normal file
15
.env.example
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
NETWORKS_DRIVER=bridge
|
||||||
|
VOLUMES_DRIVER=local
|
||||||
|
TIMEZONE=UTC
|
||||||
|
DATA_PATH=./data
|
||||||
|
|
||||||
|
################# MoneyWhere ###################
|
||||||
|
PLAYEDU_PC_PORT=9800
|
||||||
|
PLAYEDU_ADMIN_PORT=9900
|
||||||
|
|
||||||
|
################# MySQL ###################
|
||||||
|
MYSQL_HOST=mysql
|
||||||
|
MYSQL_PORT=3306
|
||||||
|
MYSQL_DATABASE=moneywhere
|
||||||
|
MYSQL_USER=root
|
||||||
|
MYSQL_ROOT_PASSWORD=123456
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.idea
|
18
api.env
Normal file
18
api.env
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
DB_HOST=mysql
|
||||||
|
DB_PORT=3306
|
||||||
|
DB_NAME=moneywhere
|
||||||
|
DB_USER=root
|
||||||
|
DB_PASSWORD=123456
|
||||||
|
SERVER_PORT=9092
|
||||||
|
DDL_AUTO=update
|
||||||
|
SHOW_SQL=true
|
||||||
|
|
||||||
|
invite_code=111111
|
||||||
|
|
||||||
|
wxopen_appsecret=xxxxxxxxxxxx
|
||||||
|
wxopen_appid=xxxxxxxxxxx
|
||||||
|
wxopen_redirect_url=http://xxxxxxxxxxxx/api/v1/loginWechat/callback
|
||||||
|
wxopen_appsecret_app=xxxxxxxxxxxxxx
|
||||||
|
wxopen_appid_app=xxxxxxxxxxxxx
|
||||||
|
|
||||||
|
user_api_base_url=https://api.moneywhere.com/api/v1/user-api/
|
42
docker-compose.yml
Normal file
42
docker-compose.yml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
version: '3.6'
|
||||||
|
|
||||||
|
services:
|
||||||
|
mysql:
|
||||||
|
build: ./mysql/
|
||||||
|
command: --init-file /data/1.sql
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
- MYSQL_ROOT_PASSWORD=123456
|
||||||
|
volumes:
|
||||||
|
- mysql_data:/var/lib/mysql
|
||||||
|
|
||||||
|
phpmyadmin:
|
||||||
|
depends_on:
|
||||||
|
- mysql
|
||||||
|
image: phpmyadmin/phpmyadmin
|
||||||
|
ports:
|
||||||
|
- "8085:80"
|
||||||
|
environment:
|
||||||
|
PMA_ARBITRARY: 1
|
||||||
|
PMA_HOST: mysql
|
||||||
|
PMA_USER: root
|
||||||
|
PMA_PASSWORD: 123456
|
||||||
|
|
||||||
|
moneywhere-api-user:
|
||||||
|
depends_on:
|
||||||
|
- mysql
|
||||||
|
image: markliu2018/moneywhere-api-user:latest
|
||||||
|
env_file: api.env
|
||||||
|
|
||||||
|
moneywhere-fe-user:
|
||||||
|
depends_on:
|
||||||
|
- moneywhere-api-user
|
||||||
|
image: markliu2018/moneywhere-fe-user:latest
|
||||||
|
environment:
|
||||||
|
USER_API_HOST: http://moneywhere-api-user:9092
|
||||||
|
API_HOST: https://api.moneywhere.com/api/v1/user-api
|
||||||
|
ports:
|
||||||
|
- "6060:80"
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
mysql_data:
|
14
mysql/Dockerfile
Normal file
14
mysql/Dockerfile
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
FROM mysql:8.0
|
||||||
|
|
||||||
|
#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/
|
||||||
|
|
||||||
|
COPY my.cnf /etc/mysql/conf.d/my.cnf
|
||||||
|
COPY init.sql /data/1.sql
|
||||||
|
|
||||||
|
RUN chmod 0444 /etc/mysql/conf.d/my.cnf
|
||||||
|
|
||||||
|
CMD ["mysqld"]
|
||||||
|
|
||||||
|
EXPOSE 3306
|
2
mysql/init.sql
Normal file
2
mysql/init.sql
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
CREATE DATABASE moneywhere CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
|
||||||
|
USE moneywhere;
|
14
mysql/my.cnf
Normal file
14
mysql/my.cnf
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# The MySQL Client configuration file.
|
||||||
|
#
|
||||||
|
# For explanations see
|
||||||
|
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
|
||||||
|
|
||||||
|
[mysql]
|
||||||
|
|
||||||
|
[mysqld]
|
||||||
|
character-set-server=utf8mb4
|
||||||
|
default-time-zone='+8:00'
|
||||||
|
innodb_rollback_on_timeout='ON'
|
||||||
|
max_connections=500
|
||||||
|
innodb_lock_wait_timeout=500
|
||||||
|
default-authentication-plugin=mysql_native_password
|
Loading…
Reference in New Issue
Block a user