docker-compose.yml
version: "3"
services:
web:
image: nginx
container_name: admin_web
restart: always
ports:
- "80:80"
volumes:
- /root/nginx/nginx:/etc/nginx/
- /root/nginx/share:/usr/share/
environment:
- TZ="Asia/Shanghai"
entrypoint: ["/bin/bash", "-c", "apt-get update && apt-get install -y iputils-ping && nginx -g 'daemon off;'"]
admin_backend:
image: openjdk:11
working_dir: /root/likeadmin
container_name: admin_backend
restart: always
ports:
- "8085:8085"
volumes:
- /root/nginx_test/:/root/likeadmin/
entrypoint: java -jar like-admin-1.0.0.jar
front_backend:
image: openjdk:11
working_dir: /root/likeadmin
container_name: front_backend
restart: always
ports:
- "8084:8084"
volumes:
- /root/nginx_test/:/root/likeadmin/
entrypoint: java -jar like-front-1.0.0.jar
mysql:
image: mysql:5.7
container_name: mysql
restart: always
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=ccpphh130.
volumes:
- /etc/mysql/conf.d:/etc/mysql/conf.d
- /etc/localtime:/etc/localtime:ro
- /home/docker/mysql5:/var/lib/mysql
redis:
image: redis:latest
container_name: redis
restart: always
ports:
- "6379:6379"
volumes:
- /usr/local/redis/redis.conf:/usr/local/redis/bin/redis.conf