docker/symphony/docker-compose.yml

67 lines
1.8 KiB
YAML

version: '3'
networks:
&network net:
driver: bridge
ipam:
driver: default
services:
http:
image: registry.cn-hangzhou.aliyuncs.com/kennylee/tnginx
container_name: sym-http
restart: always
ports:
- "80:80"
volumes:
- ./config/http/default.conf:/etc/nginx/conf.d/default.conf
networks:
- *network
logging:
driver: 'json-file'
options:
max-size: '30m'
max-file: '1'
depends_on:
- app
app:
build: ./
container_name: sym
ports:
- "8080:8080"
volumes:
#- ./config/server.xml:/opt/tomcat/conf/server.xml:ro
- ./config/app/latke.properties:/opt/tomcat/webapps/ROOT/WEB-INF/classes/latke.properties:z
- ./data/logs/:/opt/tomcat/logs/:z
- ./data/app/upload:/opt/tomcat/upload:z
restart: always
environment:
- JAVA_OPTS=-Djava.security.egd=file:///dev/urandom -server -Xms128m -Xmx1024m
networks:
- *network
logging:
driver: 'json-file'
options:
max-size: '30m'
max-file: '1'
depends_on:
- db
db:
image: registry.cn-hangzhou.aliyuncs.com/kennylee/mysql
container_name: sym-db
ports:
- "3306"
restart: always
volumes:
- ./data/mysql/:/var/lib/mysql/:rw
- ./database/schema.sql:/docker-entrypoint-initdb.d/schema.sql:ro
environment:
- MYSQL_ROOT_PASSWORD=111111
networks:
- *network
logging:
driver: 'json-file'
options:
max-size: '30m'
max-file: '1'