74 lines
1.8 KiB
YAML
74 lines
1.8 KiB
YAML
version : '3.8'
|
|
services:
|
|
agt-mysql:
|
|
container_name: agt-mysql
|
|
image: mysql:5.7
|
|
restart: always
|
|
build:
|
|
context: ./mysql
|
|
ports:
|
|
- "3306:3306"
|
|
volumes:
|
|
- ./mysql/db:/docker-entrypoint-initdb.d
|
|
- ./mysql/conf:/etc/mysql/conf.d
|
|
- ./mysql/logs:/logs
|
|
- ./mysql/data:/var/lib/mysql
|
|
command: [
|
|
'mysqld',
|
|
'--innodb-buffer-pool-size=80M',
|
|
'--character-set-server=utf8mb4',
|
|
'--collation-server=utf8mb4_unicode_ci',
|
|
'--default-time-zone=+8:00',
|
|
'--lower-case-table-names=1'
|
|
]
|
|
environment:
|
|
MYSQL_DATABASE: 'agt-cloud'
|
|
MYSQL_ROOT_PASSWORD: 123456
|
|
agt-redis:
|
|
container_name: agt-redis
|
|
image: redis:7.4.1
|
|
restart: always
|
|
build:
|
|
context: ./redis
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- ./redis/conf/redis.conf:/home/agt/redis/redis.conf
|
|
- ./redis/data:/data
|
|
command: redis-server /home/agt/redis/redis.conf
|
|
agt-nginx:
|
|
container_name: agt-nginx
|
|
image: nginx:1.29.0
|
|
restart: always
|
|
build:
|
|
context: ./nginx
|
|
ports:
|
|
- "80:80"
|
|
volumes:
|
|
- ./nginx/html/dist:/home/agt/html
|
|
- ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
|
|
- ./nginx/logs:/var/log/nginx
|
|
- ./nginx/conf.d:/etc/nginx/conf.d
|
|
agt-server:
|
|
container_name: agt-server
|
|
restart: always
|
|
build:
|
|
context: ./agt
|
|
dockerfile: dockerfile
|
|
ports:
|
|
- "48080:48080"
|
|
environment:
|
|
- SPRING_PROFILES_ACTIVE=test
|
|
- TZ=Asia/Shanghai
|
|
depends_on:
|
|
- agt-redis
|
|
- agt-mysql
|
|
volumes:
|
|
- /usr/local/licGen/log/:/usr/local/licGen/log/
|
|
- ./agt/config/application-test.yaml:/app/config/application-test.yaml
|
|
command: ["--spring.config.location=/app/config/application-test.yaml"]
|
|
links:
|
|
- agt-redis
|
|
- agt-mysql
|
|
|