129 lines
4.3 KiB
YAML
129 lines
4.3 KiB
YAML
|
|
version: '3.8'
|
||
|
|
|
||
|
|
services:
|
||
|
|
# mysql:
|
||
|
|
# image: mysql:8.0
|
||
|
|
# container_name: timeline-mysql
|
||
|
|
# ports:
|
||
|
|
# - "33306:33306"
|
||
|
|
# environment:
|
||
|
|
# MYSQL_ROOT_PASSWORD: WoCloud@9ol7uj
|
||
|
|
# MYSQL_DATABASE: timeline
|
||
|
|
# volumes:
|
||
|
|
# - ./mysql-init:/docker-entrypoint-initdb.d
|
||
|
|
# - mysql_data:/var/lib/mysql
|
||
|
|
|
||
|
|
redis:
|
||
|
|
image: redis:7-alpine
|
||
|
|
container_name: timeline-redis
|
||
|
|
ports:
|
||
|
|
- "36379:6379"
|
||
|
|
command: redis-server --requirepass 123456
|
||
|
|
|
||
|
|
# minio:
|
||
|
|
# image: minio/minio:latest
|
||
|
|
# container_name: timeline-minio
|
||
|
|
# ports:
|
||
|
|
# - "9000:9000"
|
||
|
|
# - "9001:9001"
|
||
|
|
# environment:
|
||
|
|
# MINIO_ROOT_USER: 9ttSGjvQxek2uKKlhpqI
|
||
|
|
# MINIO_ROOT_PASSWORD: 12CaKew53tu94tgyDLoqAwAq32iDuz3SWW0O1hex
|
||
|
|
# command: server /data --console-address ":9001"
|
||
|
|
# volumes:
|
||
|
|
# - minio_data:/data
|
||
|
|
|
||
|
|
timeline-story-service:
|
||
|
|
build:
|
||
|
|
context: ./timeline-story-service
|
||
|
|
dockerfile: Dockerfile
|
||
|
|
container_name: timeline-story-service
|
||
|
|
ports:
|
||
|
|
- "30001:30001"
|
||
|
|
environment:
|
||
|
|
- server.port=30001
|
||
|
|
- spring.datasource.url=jdbc:mysql://mysql:3306/timeline?serverTimezone=UTC&allowPublicKeyRetrieval=true
|
||
|
|
- spring.datasource.username=root
|
||
|
|
- spring.datasource.password=WoCloud@9ol7uj
|
||
|
|
- spring.data.redis.host=redis
|
||
|
|
- spring.data.redis.port=6379
|
||
|
|
- spring.data.redis.password=123456
|
||
|
|
- file.service.url=http://timeline-file-service:30002/file/
|
||
|
|
- user.service.url=http://timeline-user-service:30003/user/
|
||
|
|
depends_on:
|
||
|
|
- redis
|
||
|
|
restart: unless-stopped
|
||
|
|
|
||
|
|
timeline-file-service:
|
||
|
|
build:
|
||
|
|
context: ./timeline-file-service
|
||
|
|
dockerfile: Dockerfile
|
||
|
|
container_name: timeline-file-service
|
||
|
|
ports:
|
||
|
|
- "30002:30002"
|
||
|
|
environment:
|
||
|
|
- server.port=30002
|
||
|
|
- spring.datasource.url=jdbc:mysql://mysql:3306/timeline?serverTimezone=UTC&allowPublicKeyRetrieval=true
|
||
|
|
- spring.datasource.username=root
|
||
|
|
- spring.datasource.password=WoCloud@9ol7uj
|
||
|
|
- minio.endpoint=http://minio:9000
|
||
|
|
- minio.accessKey=9ttSGjvQxek2uKKlhpqI
|
||
|
|
- minio.secretKey=12CaKew53tu94tgyDLoqAwAq32iDuz3SWW0O1hex
|
||
|
|
- minio.bucketName=timeline-test
|
||
|
|
restart: unless-stopped
|
||
|
|
|
||
|
|
timeline-user-service:
|
||
|
|
build:
|
||
|
|
context: ./timeline-user-service
|
||
|
|
dockerfile: Dockerfile
|
||
|
|
container_name: timeline-user-service
|
||
|
|
ports:
|
||
|
|
- "30003:30003"
|
||
|
|
environment:
|
||
|
|
- server.port=30003
|
||
|
|
- spring.datasource.url=jdbc:mysql://mysql:3306/timeline?serverTimezone=UTC&allowPublicKeyRetrieval=true
|
||
|
|
- spring.datasource.username=root
|
||
|
|
- spring.datasource.password=WoCloud@9ol7uj
|
||
|
|
- spring.data.redis.host=redis
|
||
|
|
- spring.data.redis.port=6379
|
||
|
|
- spring.data.redis.password=123456
|
||
|
|
restart: unless-stopped
|
||
|
|
|
||
|
|
timeline-gateway-service:
|
||
|
|
build:
|
||
|
|
context: ./timeline-gateway-service
|
||
|
|
dockerfile: Dockerfile
|
||
|
|
container_name: timeline-gateway-service
|
||
|
|
ports:
|
||
|
|
- "30000:30000"
|
||
|
|
environment:
|
||
|
|
- server.port=30000
|
||
|
|
- spring.cloud.gateway.routes[0].id=story-service
|
||
|
|
- spring.cloud.gateway.routes[0].uri=http://timeline-story-service:30001
|
||
|
|
- spring.cloud.gateway.routes[0].predicates[0]=Path=/story/**
|
||
|
|
- spring.cloud.gateway.routes[0].filters[0]=StripPrefix=0
|
||
|
|
- spring.cloud.gateway.routes[1].id=file-service
|
||
|
|
- spring.cloud.gateway.routes[1].uri=http://timeline-file-service:30002
|
||
|
|
- spring.cloud.gateway.routes[1].predicates[0]=Path=/file/**
|
||
|
|
- spring.cloud.gateway.routes[1].filters[0]=StripPrefix=0
|
||
|
|
- spring.cloud.gateway.routes[2].id=user-service
|
||
|
|
- spring.cloud.gateway.routes[2].uri=http://timeline-user-service:30003
|
||
|
|
- spring.cloud.gateway.routes[2].predicates[0]=Path=/user/**
|
||
|
|
- spring.cloud.gateway.routes[2].filters[0]=StripPrefix=0
|
||
|
|
- spring.cloud.gateway.routes[3].id=user-service-ws
|
||
|
|
- spring.cloud.gateway.routes[3].uri=http://timeline-user-service:30003
|
||
|
|
- spring.cloud.gateway.routes[3].predicates[0]=Path=/user/ws/**
|
||
|
|
- spring.cloud.gateway.routes[3].filters[0]=StripPrefix=0
|
||
|
|
- spring.datasource.url=jdbc:mysql://mysql:3306/timeline?serverTimezone=UTC&allowPublicKeyRetrieval=true
|
||
|
|
- spring.datasource.username=root
|
||
|
|
- spring.datasource.password=WoCloud@9ol7uj
|
||
|
|
depends_on:
|
||
|
|
- timeline-story-service
|
||
|
|
- timeline-file-service
|
||
|
|
- timeline-user-service
|
||
|
|
restart: unless-stopped
|
||
|
|
|
||
|
|
volumes:
|
||
|
|
mysql_data:
|
||
|
|
minio_data:
|