jeepay/docs
陈泉 b86b55cafa 添加 Docker 支持
编译命令

```
docker buildx build . --build-arg PORT=9216 --build-arg PLATFORM=payment -t jeepay-payment:latest
```
```
docker buildx build . --build-arg PORT=9217 --build-arg PLATFORM=manager -t jeepay-manager:latest
```
```
docker buildx build . --build-arg PORT=9218 --build-arg PLATFORM=merchant -t jeepay-merchant:latest
```

如果你需要多平台镜像,你可以使用 `--platform linux/amd64,linux/arm64`
 ```
docker buildx build . --build-arg PORT=9218 --build-arg PLATFORM=merchant -t jeepay-merchant:latest --platform linux/amd64,linux/arm64
```

启动命令
```
docker run -d -p 9216:9216 jeepay-payment:latest
```
```
docker run -d -p 9217:9217 jeepay-manager:latest
```
```
docker run -d -p 9218:9218 jeepay-merchant:latest
```

## Docker Compose 一次性运行所有环境
由于每个人的环境都不太一样,这里没有添加到项目内,可以放到文档里作为 demo
```
version: '3'

services:
  mysql:
    hostname: mysql
    container_name: mysql
    #    image: mysql:8
    image: mysql/mysql-server:latest
    ports:
      - '3306:3306'
    environment:
      MYSQL_ROOT_PASSWORD: 'root'
      MYSQL_DATABASE: 'jeepay'
    volumes:
      - './data/mysql:/var/lib/mysql'
      - './data/mysql/conf.d:/etc/mysql/conf.d'
      - './data/mysql/log:/var/log/mysql'
      - './data/mysql/data:/var/lib/mysql/data'
      - './docs/sql/init.sql:/workspace/init.sql'
  #  activemq 并没有官方维护的 Docker 镜像这里不推荐使用。
  #  activemq:
  #    container_name: activemq
  #    image: activemq:5.15.3
  #    ports:
  #      - '61616:61616'
  #      - '8161:8161'
  #    environment:
  #      ACTIVEMQ_USER: 'admin'
  #      ACTIVEMQ_PASSWORD: 'admin'
  #  rocketmq 配置 https://github.com/apache/rocketmq-docker
  #  rabbitmq:
  #    hostname: rabbitmq
  #    container_name: rabbitmq
  #    image: rabbitmq:latest
  #    ports:
  #      - "15672:15672"
  #      - "4369:4369"
  #      - "5672:5672"
  #      - "25672:25672"
  #    environment:
  #      RABBITMQ_DEFAULT_USER: 'admin'
  #      RABBITMQ_DEFAULT_PASS: 'admin'
  #      RABBITMQ_DEFAULT_VHOST: 'jeepay'
  #    volumes:
  #      - './data/rabbitmq:/var/lib/rabbitmq'
  #      - './data/rabbitmq/conf:/etc/rabbitmq'
  #      - './data/rabbitmq/log:/var/log/rabbitmq'
  #      - './data/rabbitmq/data:/var/lib/rabbitmq/data'
  payment:
    build:
      context: .
      dockerfile: Dockerfile
      args:
        PORT: 9216
        PLATFORM: payment
    image: jeepay_payment:latest
    hostname: payment
    container_name: jeepay-payment
    ports:
      - "9216:9216"
    depends_on:
      - mysql
  #      - rabbitmq
  manager:
    build:
      context: .
      dockerfile: Dockerfile
      args:
        PORT: 9217
        PLATFORM: manager
    image: jeepay_manager:latest
    hostname: manager
    container_name: jeepay-manager
    ports:
      - "9217:9217"
    depends_on:
      - mysql
  #      - rabbitmq
  merchant:
    build:
      context: .
      dockerfile: Dockerfile
      args:
        PORT: 9218
        PLATFORM: merchant
    image: jeepay_merchant:latest
    hostname: merchant
    container_name: jeepay-merchant
    ports:
      - "9218:9218"
    depends_on:
      - mysql
#      - rabbitmq
```
2022-03-29 19:26:47 +08:00
..
script 初始化Jeepay项目 2021-06-09 16:05:40 +08:00
sql 微信支付配置添加证书文件(apiclient_cert.pem) 2022-03-01 19:18:03 +08:00
Dockerfile 添加 Docker 支持 2022-03-29 19:26:47 +08:00