Skip to content

Commit

Permalink
Merge pull request #165 from terwer/v4.x
Browse files Browse the repository at this point in the history
feat:v4.0.1预发布
  • Loading branch information
terwer authored Jun 19, 2022
2 parents e52cc35 + d18a26d commit 717a5b1
Show file tree
Hide file tree
Showing 105 changed files with 3,426 additions and 27,053 deletions.
35 changes: 24 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ With Docker,Vue,Vue CLI 3,webpack,Java and Spring Boot

# Important Changes in JVue 4

Use [Docker](https://docs.docker.com/develop/dev-best-practices/) for deploy
Using [Docker](https://docs.docker.com/develop/dev-best-practices/) for deploy

# Install
The instructions assume that you have already installed [Docker](https://docs.docker.com/installation/) and [Docker Compose](https://docs.docker.com/compose/install/).
Expand All @@ -40,24 +40,37 @@ yum install docker
curl -L https://get.daocloud.io/docker/compose/releases/download/1.25.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
```

See https://docs.docker.com/compose/reference/up/
See [https://docs.docker.com/compose/reference/up/](https://docs.docker.com/compose/reference/up/)

## run jvue
```bash
docker compose up --build
```

or

### via docker(for production)
```bash
docker compose up -d --build
```

# Check
### custom(for dev)
1. mysql

```bash
docker compose ps
```
```bash
docker compose -f docker-compose-mysql.yml
```

2. Jvue-server

```bash
cd /Users/terwer/Documents/myworks/jvue/jvue-server/src/main/java/com/terwergreen/jvueserver
# then run JVueServerApplication `main` function
# that's all
```

3. Jvue-front

```bash
cd /Users/terwer/Documents/myworks/jvue/jvue-front
yarn
yarn dev
```

# Structure

Expand Down
81 changes: 4 additions & 77 deletions docker-compose-mysql.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,9 @@
# 构建docker-compose项目
# docker-compose --log-level INFO build
# docker-compose --log-level INFO build jvue-front

# 重启并清理以及重建容器
# docker-compose --log-level INFO up --force-recreate --remove-orphans
# docker-compose --log-level INFO up --force-recreate jvue-front

# 重启并重建镜像
# docker-compose --log-level INFO up --build --force-recreate --remove-orphans
# docker-compose --log-level INFO up --build --force-recreate jvue-front

# 启动守护线程
# docker-compose --log-level INFO up -d

# 重启并重建镜像启动守护线程
# docker-compose --log-level INFO up -d --build --force-recreate jvue-front

# oracle doc
# DB_SID
# This parameter changes the ORACLE_SID of the database. The default value is set to ORCLCDB.
# To connect from outside the container using SQL*Plus,
# $ sqlplus sys/Oradoc_db1@ORCLCDB as sysdba
# Changing default password for SYS user
# alter user sys identified by <new-password>;
# The database alert log can be viewed with
# $ docker logs <Oracle-DB>
# docker compose --log-level INFO up -- build
# docker compose --log-level INFO up -d --build

version: '3'
services:
jvue-nginx:
image: jvue/nginx:1.15.9
container_name: jvue-nginx
build:
context: ./
dockerfile: ./jvue-nginx/Dockerfile
ports:
- "80:80"
volumes:
- ./jvue-nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- ./data/nginx/log:/var/log/nginx
restart: always
jvue-mysql:
image: jvue/mysql:5.7.24
container_name: jvue-mysql
Expand All @@ -53,49 +17,12 @@ services:
- "TZ=CST-8"
- "MYSQL_ROOT_PASSWORD=123456"
- "MYSQL_ROOT_HOST=%"
- "MYSQL_DATABASE=bugucms"
- "MYSQL_DATABASE=bugucms4"
- "MYSQL_USER=terwer"
- "MYSQL_PASSWORD=123456"
volumes:
- ./data/mysql/db:/var/db
- ./data/mysql/log:/var/log
- ./jvue-mysql/my.cnf:/etc/my.cnf
- ./jvue-mysql/init:/docker-entrypoint-initdb.d/
restart: always
jvue-server:
image: jvue/server:4.0.0
container_name: jvue-server
build:
context: ./
dockerfile: ./jvue-server/Dockerfile
ports:
- "8081:8081"
working_dir: /app
command: mvn clean spring-boot:run -Dspring-boot.run.profiles=docker -DskipTests
volumes:
- ./jvue-server:/app
- ./data/maven/.m2:/root/.m2
- ./data/server/logs:/logs
restart: always
jvue-front:
container_name: jvue-front
image: jvue/front:4.0.0
build:
context: .
dockerfile: ./jvue-front/Dockerfile
ports:
- "3000:3000"
environment:
- npm_config_unsafe_perm=true
restart: always
jvue-admin:
container_name: jvue-admin
image: jvue/admin:4.0.0
build:
context: .
dockerfile: ./jvue-admin/Dockerfile
ports:
- "3001:3001"
environment:
- npm_config_unsafe_perm=true
restart: always
restart: "no"
91 changes: 0 additions & 91 deletions docker-compose-oracle.yml

This file was deleted.

44 changes: 44 additions & 0 deletions docker-compose-with-rds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 构建docker-compose项目
# docker compose --log-level INFO up -- build
# docker compose --log-level INFO up -d --build

version: '3'
services:
jvue-nginx:
image: jvue/nginx:1.15.9
container_name: jvue-nginx
build:
context: ./
dockerfile: ./jvue-nginx/Dockerfile
ports:
- "80:80"
volumes:
- ./jvue-nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- ./data/nginx/log:/var/log/nginx
restart: "no"
jvue-server:
image: jvue/server:4.0.1
container_name: jvue-server
build:
context: ./
dockerfile: ./jvue-server/Dockerfile
ports:
- "8002:8002"
working_dir: /app
command: mvn clean spring-boot:run -Dspring-boot.run.profiles=rds -DskipTests
volumes:
- ./jvue-server:/app
- ./data/maven/.m2:/root/.m2
- ./data/server/logs:/logs
restart: "no"
jvue-front:
container_name: jvue-front
image: jvue/front:4.0.1
build:
context: .
dockerfile: ./jvue-front/Dockerfile
ports:
- "3000:3000"
environment:
- npm_config_unsafe_perm=true
restart: "no"
57 changes: 12 additions & 45 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,6 @@
# 构建docker-compose项目
# docker-compose --log-level INFO build
# docker-compose --log-level INFO build jvue-front

# 重启并清理以及重建容器
# docker-compose --log-level INFO up --force-recreate --remove-orphans
# docker-compose --log-level INFO up --force-recreate jvue-front

# 重启并重建镜像
# docker-compose --log-level INFO up --build --force-recreate --remove-orphans
# docker-compose --log-level INFO up --build --force-recreate jvue-front

# 启动守护线程
# docker-compose --log-level INFO up -d

# 重启并重建镜像启动守护线程
# docker-compose --log-level INFO up -d --build --force-recreate jvue-front

# oracle doc
# DB_SID
# This parameter changes the ORACLE_SID of the database. The default value is set to ORCLCDB.
# To connect from outside the container using SQL*Plus,
# $ sqlplus sys/Oradoc_db1@ORCLCDB as sysdba
# Changing default password for SYS user
# alter user sys identified by <new-password>;
# The database alert log can be viewed with
# $ docker logs <Oracle-DB>
# docker compose --log-level INFO up -- build
# docker compose --log-level INFO up -d --build

version: '3'
services:
Expand All @@ -39,7 +15,7 @@ services:
volumes:
- ./jvue-nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- ./data/nginx/log:/var/log/nginx
restart: always
restart: "no"
jvue-mysql:
image: jvue/mysql:5.7.24
container_name: jvue-mysql
Expand All @@ -53,47 +29,38 @@ services:
- "TZ=CST-8"
- "MYSQL_ROOT_PASSWORD=123456"
- "MYSQL_ROOT_HOST=%"
- "MYSQL_DATABASE=bugucms"
- "MYSQL_DATABASE=bugucms4"
- "MYSQL_USER=terwer"
- "MYSQL_PASSWORD=123456"
volumes:
- ./data/mysql/db:/var/db
- ./data/mysql/log:/var/log
- ./jvue-mysql/my.cnf:/etc/my.cnf
- ./jvue-mysql/init:/docker-entrypoint-initdb.d/
restart: always
jvue-server:
image: jvue/server:4.0.0
image: jvue/server:4.0.1
container_name: jvue-server
build:
context: ./
dockerfile: ./jvue-server/Dockerfile
ports:
- "8081:8081"
- "8002:8002"
working_dir: /app
command: mvn clean spring-boot:run -Dspring-boot.run.profiles=docker -DskipTests
volumes:
- ./jvue-server:/app
- ./data/maven/.m2:/root/.m2
- ./data/server/logs:/logs
restart: always
restart: "no"
jvue-front:
container_name: jvue-front
image: jvue/front:4.0.0
image: jvue/front:4.0.1
build:
context: .
dockerfile: ./jvue-front/Dockerfile
ports:
- "3000:3000"
environment:
- npm_config_unsafe_perm=true
restart: always
jvue-admin:
privileged: true
container_name: jvue-admin
image: jvue/admin:4.0.0
build:
context: .
dockerfile: ./jvue-admin/Dockerfile
ports:
- "3001:3001"
environment:
- npm_config_unsafe_perm=true
restart: always
restart: "no"
Loading

0 comments on commit 717a5b1

Please sign in to comment.