You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
know_sub/docker-compose/docker-compose.yml

65 lines
1.6 KiB
YAML

services:
mysql:
image: mysql:5.7
container_name: know-sub-mysql
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD}
- TZ=${TIMEZONE}
command:
--max_connections=100
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--default-authentication-plugin=mysql_native_password
--tls_version="TLSv1.2,TLSv1.3"
ports:
- ${MYSQL_PORT}:3306
volumes:
- ./mysql/data:/var/lib/mysql
- ./know_sub_init.sql:/docker-entrypoint-initdb.d/know_sub_init.sql
networks:
- know-sub-network
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-uroot", "-p${MYSQL_PASSWORD}" ]
interval: 10s
timeout: 10s
retries: 3
start_period: 40s
restart: always
know-sub-web:
depends_on:
mysql:
condition: service_started
image: know-sub-web:1.0.0
container_name: know-sub-web
ports:
- ${WEB_HTTP_PORT}:9201
volumes:
- ./know-sub-web/:/data/know_sub/web/
command:
--spring.profiles.active=${SPRING_PROFILES_ACTIVE}
--datasource.password=${MYSQL_PASSWORD}
environment:
- TZ=${TIMEZONE}
networks:
- know-sub-network
restart: always
know-sub-nginx:
depends_on:
know-sub-web:
condition: service_started
image: know-sub-nginx:1.0.0
container_name: know-sub-nginx
ports:
- ${NGINX_HTTP_PORT}:80
volumes:
- ./know-sub-nginx/html/:/usr/share/nginx/html/
environment:
- TZ=${TIMEZONE}
- KNOW_SUB_SERVERS=${KNOW_SUB_SERVERS}
networks:
- know-sub-network
restart: always
networks:
know-sub-network:
driver: bridge