├── .gitattributes ├── .gitignore ├── README.md ├── README_docker.md ├── api-no-mysql.env ├── api.env ├── docker-compose-all-hub.yml ├── docker-compose-all-no-mysql-hub.yml ├── docker-compose-hub-no-mysql.yml ├── docker-compose-hub.yml ├── docker-compose-no-mysql.yml ├── docker-compose.yml ├── notes.txt ├── struct.png └── structure.docx /.gitattributes: -------------------------------------------------------------------------------- 1 | # From https://github.com/Danimoth/gitattributes/blob/master/Web.gitattributes 2 | 3 | # Handle line endings automatically for files detected as text 4 | # and leave all files detected as binary untouched. 5 | * text=auto 6 | 7 | # 8 | # The above will handle all files NOT found below 9 | # 10 | 11 | # 12 | ## These files are text and should be normalized (Convert crlf => lf) 13 | # 14 | 15 | # source code 16 | *.json text 17 | *.sql text 18 | *.sh text 19 | *.bat text 20 | 21 | 22 | 23 | # server config 24 | .htaccess text 25 | .nginx.conf text 26 | 27 | # git config 28 | .gitattributes text 29 | .gitignore text 30 | .gitconfig text 31 | 32 | # code analysis config 33 | .jshintrc text 34 | .jscsrc text 35 | .jshintignore text 36 | .csslintrc text 37 | 38 | # misc config 39 | *.yaml text 40 | *.yml text 41 | .editorconfig text 42 | 43 | # build config 44 | *.npmignore text 45 | *.bowerrc text 46 | 47 | # Documentation 48 | *.md text 49 | LICENSE text 50 | AUTHORS text 51 | 52 | 53 | # 54 | ## These files are binary and should be left untouched 55 | # 56 | 57 | # (binary is a macro for -text -diff) 58 | *.png binary 59 | *.jpg binary 60 | *.jpeg binary 61 | *.gif binary 62 | *.ico binary 63 | *.mov binary 64 | *.mp4 binary 65 | *.mp3 binary 66 | *.gz binary 67 | *.zip binary 68 | *.7z binary 69 | *.ttf binary 70 | *.eot binary 71 | *.woff binary 72 | *.pyc binary 73 | *.pdf binary 74 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Money Note Docker Running 2 | 3 | This project is about how to run MoneyNote in Docker, support amd and arm. 4 | 5 | #### Please be note if running in public network 6 | 1. The default mysql root password is 78p7gkc1, please change it after setup. 7 | 2. Please change the default invite code. 8 | 9 | ### Quick Run 10 | 11 | ```sh 12 | docker run --name moneynote -e DB_PASSWORD=78p7gkc1 -e invite_code=111111 -v moneynote_mysql_data:/var/lib/mysql -p 43740:3306 -p 43741:80 -p 43742:9092 -p 43743:81 -p 43744:82 markliu2018/moneynote-all:latest 13 | ``` 14 | 15 | If you have mysql service, you can use docker image without mysql service. 16 | 17 | ```sh 18 | docker run --name moneynote -d \ 19 | -e DB_HOST=your_ip \ 20 | -e DB_PORT=3306 \ 21 | -e DB_NAME=moneynote \ 22 | -e DB_USER=root \ 23 | -e DB_PASSWORD=your_password \ 24 | -e invite_code=111111 \ 25 | -p 43742:9092 \ 26 | -p 43743:81 \ 27 | -p 43744:82 \ 28 | markliu2018/moneynote-all-no-mysql:latest 29 | ``` 30 | 31 | ### docker compose running(Recommended) 32 | 33 | 1. Fetch source code, use git. 34 | 35 | ```sh 36 | git clone https://github.com/getmoneynote/docker-compose-moneynote-hub.git && cd docker-compose-moneynote-hub 37 | ``` 38 | 39 | 2. docker compose running 40 | 41 | ```sh 42 | docker compose up -d 43 | ``` 44 | 45 | 3. Upgrade 46 | 47 | ```sh 48 | docker compose pull && docker compose up -d 49 | ``` 50 | 51 | After Running, Visit PC Web [http://127.0.0.1:43743](http://127.0.0.1:43743) 52 | 53 | Mobile H5, [http://127.0.0.1:43744](http://127.0.0.1:43744)。 54 | 55 | phpMyAdmin [http://127.0.0.1:43741](http://127.0.0.1:43741) you can export data。 56 | 57 | #### docker note 58 | 59 | with mysql running (arm) 60 | ```sh 61 | docker compose --env-file api.env -f docker-compose-hub.yml up -d 62 | ``` 63 | 64 | with mysql upgrade 65 | ```sh 66 | docker compose --env-file api.env -f docker-compose-hub.yml pull && docker compose --env-file api.env -f docker-compose-hub.yml up -d 67 | ``` 68 | 69 | no mysql running 70 | ```sh 71 | docker compose --env-file api-no-mysql.env -f docker-compose-hub-no-mysql.yml up -d 72 | ``` 73 | 74 | no mysql upgrade 75 | ```sh 76 | docker compose --env-file api-no-mysql.env -f docker-compose-hub-no-mysql.yml pull && docker compose --env-file api-no-mysql.env -f docker-compose-hub-no-mysql.yml up -d 77 | ``` 78 | 79 | docker 5 in 1 running 80 | ```sh 81 | docker compose --env-file api.env -f docker-compose-all-hub.yml up -d 82 | ``` 83 | 84 | docker 5 in 1 upgrade 85 | ```sh 86 | docker compose -f docker-compose-all-hub.yml pull && docker compose --env-file api.env -f docker-compose-all-hub.yml up -d 87 | ``` 88 | 89 | docker 3 in 1 running 90 | ```sh 91 | docker compose --env-file api-no-mysql.env -f docker-compose-all-no-mysql-hub.yml up -d 92 | ``` 93 | 94 | docker 3 in 1 upgrade 95 | ```sh 96 | docker compose -f docker-compose-all-hub.yml pull && docker compose --env-file api-no-mysql.env -f docker-compose-all-no-mysql-hub.yml up -d 97 | ``` -------------------------------------------------------------------------------- /README_docker.md: -------------------------------------------------------------------------------- 1 | ## 九快记账 2 | 3 | Docker一键运行自己的记账系统 4 | 5 | 部署前,请确保已安装docker。如遇到任何问题欢迎加入 QQ群: 639653091 讨论。 6 | 7 | ## 如何使用 8 | 9 | 快速运行: 10 | 11 | ```sh 12 | docker run -p 43741:80 -p 43743:81 -p 43743:82 -e invite_code=111111 markliu2018/moneynote-all:latest 13 | ``` 14 | -------------------------------------------------------------------------------- /api-no-mysql.env: -------------------------------------------------------------------------------- 1 | DB_HOST=host.docker.internal 2 | DB_PORT=3306 3 | DB_NAME=moneynote 4 | DB_USER=root 5 | DB_PASSWORD=78p7gkc1 6 | invite_code=111111 -------------------------------------------------------------------------------- /api.env: -------------------------------------------------------------------------------- 1 | DB_PASSWORD=78p7gkc1 2 | invite_code=111111 -------------------------------------------------------------------------------- /docker-compose-all-hub.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | moneynote: 5 | container_name: moneynote 6 | image: markliu2018/moneynote-all:latest 7 | restart: always 8 | environment: 9 | - DB_PASSWORD=${DB_PASSWORD:-78p7gkc1} 10 | - invite_code=${invite_code:-111111} 11 | volumes: 12 | - moneynote_mysql_data:/var/lib/mysql 13 | ports: 14 | - "43740:3306" 15 | - "43741:80" 16 | - "43742:9092" 17 | - "43743:81" 18 | - "43744:82" 19 | 20 | volumes: 21 | moneynote_mysql_data: -------------------------------------------------------------------------------- /docker-compose-all-no-mysql-hub.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | moneynote: 5 | container_name: moneynote 6 | image: markliu2018/moneynote-all-no-mysql:latest 7 | restart: always 8 | extra_hosts: 9 | - "host.docker.internal:host-gateway" 10 | environment: 11 | - DB_HOST=${DB_HOST:-host.docker.internal} 12 | - DB_PORT=${DB_PORT:-3306} 13 | - DB_NAME=${DB_NAME:-moneynote} 14 | - DB_USER=${DB_USER:-root} 15 | - DB_PASSWORD=${DB_PASSWORD:-78p7gkc1} 16 | - invite_code=${invite_code:-111111} 17 | ports: 18 | - "43742:9092" 19 | - "43743:81" 20 | - "43744:82" 21 | -------------------------------------------------------------------------------- /docker-compose-hub-no-mysql.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | api: 5 | container_name: moneynote_api 6 | image: markliu2018/moneynote-api:latest 7 | restart: always 8 | extra_hosts: 9 | - "host.docker.internal:host-gateway" 10 | environment: 11 | - DB_HOST=${DB_HOST:-host.docker.internal} 12 | - DB_PORT=${DB_PORT:-3306} 13 | - DB_NAME=${DB_NAME:-moneynote} 14 | - DB_USER=${DB_USER:-root} 15 | - DB_PASSWORD=${DB_PASSWORD:-78p7gkc1} 16 | - invite_code=${invite_code:-111111} 17 | ports: 18 | - "43742:9092" 19 | 20 | pc: 21 | container_name: moneynote_pc 22 | links: 23 | - api 24 | image: markliu2018/moneynote-pc:latest 25 | restart: always 26 | environment: 27 | USER_API_HOST: http://api:9092 28 | ports: 29 | - "43743:80" 30 | 31 | h5: 32 | container_name: moneynote_h5 33 | links: 34 | - api 35 | image: markliu2018/moneynote-h5:latest 36 | restart: always 37 | environment: 38 | USER_API_HOST: http://api:9092 39 | ports: 40 | - "43744:80" -------------------------------------------------------------------------------- /docker-compose-hub.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | mysql: 5 | container_name: moneynote_mysql 6 | image: markliu2018/mysql5-arm:latest 7 | restart: always 8 | environment: 9 | - MYSQL_ROOT_PASSWORD= ${DB_PASSWORD:-78p7gkc1} 10 | - MYSQL_DATABASE= moneynote 11 | command: [ 12 | '--character-set-server=utf8mb4', 13 | '--collation-server=utf8mb4_general_ci', 14 | ] 15 | volumes: 16 | - moneynote_mysql_data:/var/lib/mysql 17 | ports: 18 | - "43740:3306" 19 | 20 | phpmyadmin: 21 | container_name: moneynote_phpmyadmin 22 | image: markliu2018/phpmyadmin5:latest 23 | restart: always 24 | links: 25 | - mysql 26 | environment: 27 | PMA_ARBITRARY: 1 28 | ports: 29 | - "43741:80" 30 | 31 | api: 32 | container_name: moneynote_api 33 | links: 34 | - mysql 35 | image: markliu2018/moneynote-api:latest 36 | restart: always 37 | environment: 38 | - DB_HOST=mysql 39 | - DB_PORT=3306 40 | - DB_NAME=moneynote 41 | - DB_USER=root 42 | - DB_PASSWORD=${DB_PASSWORD:-78p7gkc1} 43 | - invite_code=${invite_code:-111111} 44 | ports: 45 | - "43742:9092" 46 | 47 | pc: 48 | container_name: moneynote_pc 49 | links: 50 | - api 51 | image: markliu2018/moneynote-pc:latest 52 | restart: always 53 | environment: 54 | USER_API_HOST: http://api:9092 55 | ports: 56 | - "43743:80" 57 | 58 | h5: 59 | container_name: moneynote_h5 60 | links: 61 | - api 62 | image: markliu2018/moneynote-h5:latest 63 | restart: always 64 | environment: 65 | USER_API_HOST: http://api:9092 66 | ports: 67 | - "43744:80" 68 | 69 | volumes: 70 | moneynote_mysql_data: -------------------------------------------------------------------------------- /docker-compose-no-mysql.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | moneynote: 5 | container_name: moneynote 6 | image: markliu2018/moneynote-all-no-mysql:latest 7 | restart: always 8 | extra_hosts: 9 | - "host.docker.internal:host-gateway" 10 | environment: 11 | - DB_HOST=${DB_HOST:-host.docker.internal} 12 | - DB_PORT=${DB_PORT:-3306} 13 | - DB_NAME=${DB_NAME:-moneynote} 14 | - DB_USER=${DB_USER:-root} 15 | - DB_PASSWORD=${DB_PASSWORD:-78p7gkc1} 16 | - invite_code=${invite_code:-111111} 17 | ports: 18 | - "43742:9092" 19 | - "43743:81" 20 | - "43744:82" -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | moneynote: 5 | container_name: moneynote 6 | image: markliu2018/moneynote-all:latest 7 | restart: always 8 | environment: 9 | - DB_PASSWORD=${DB_PASSWORD:-78p7gkc1} 10 | - invite_code=${invite_code:-111111} 11 | volumes: 12 | - moneynote_mysql_data:/var/lib/mysql 13 | ports: 14 | - "43740:3306" 15 | - "43741:80" 16 | - "43742:9092" 17 | - "43743:81" 18 | - "43744:82" 19 | 20 | volumes: 21 | moneynote_mysql_data: -------------------------------------------------------------------------------- /notes.txt: -------------------------------------------------------------------------------- 1 | 78p7gkc1 2 | ALTER USER 'root'@'%' IDENTIFIED BY '111111';FLUSH PRIVILEGES; -------------------------------------------------------------------------------- /struct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getmoneynote/docker-compose-moneynote-hub/c91f82df8bbe325e2345913298624015c4be67da/struct.png -------------------------------------------------------------------------------- /structure.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getmoneynote/docker-compose-moneynote-hub/c91f82df8bbe325e2345913298624015c4be67da/structure.docx --------------------------------------------------------------------------------