elasticsearch
version: "3.7"
services:
elasticsearch:
image: elasticsearch:6.8.4
container_name: es
deploy:
resources:
limits:
memory: 2G
ports:
- '9200:9200'
- '9300:9300'
volumes:
- ./elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
- ./data:/usr/share/elasticsearch/data
- ./logs:/usr/share/elasticsearch/logs
environment:
- discovery.type=single-node
- ES_JAVA_OPTS=-Xms1024m -Xmx1024m
- TZ=Asia/Shanghai
- TAKE_FILE_OWNERSHIP=true
network.host: 0.0.0.0
node.name: node-1
discovery.zen.ping.unicast.hosts: ["0.0.0.0"]
http.cors.enabled: true
http.cors.allow-origin: "*"
xpack.security.enabled: true
xpack.security.audit.enabled: true
xpack.license.self_generated.type: basic
xpack.security.transport.ssl.enabled: true
mongo
version: '3'
services:
mongo:
image: mongo
container_name: mongo
hostname: mongo
restart: always
ports:
- "27017:27017"
environment:
TZ: Asia/Shanghai
MONGO_INITDB_DATABASE: test
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: 123456
volumes:
- /etc/localtime:/etc/localtime
- ./data:/data/db
command: mongod
mysql
version: '3.7'
services:
db:
image: mysql:5.7
container_name: mysql
ports:
- "3306:3306"
volumes:
- ./data:/var/lib/mysql
- ./my.cnf:/etc/mysql/mysql.conf.d/mysqld.cnf
restart: always
environment:
MYSQL_ROOT_PASSWORD: Chiyi@2021
TZ: Asia/Shanghai
# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2.0,
# as published by the Free Software Foundation.
#
# This program is also distributed with certain software (including
# but not limited to OpenSSL) that is licensed under separate terms,
# as designated in a particular file or component or in included license
# documentation. The authors of MySQL hereby grant you an additional
# permission to link the program and your derivative works with the
# separately licensed software that they have included with MySQL.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License, version 2.0, for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# The MySQL Server configuration file.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
[mysqld]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
#log-error = /var/log/mysql/error.log
# By default we only accept connections from localhost
#bind-address = 127.0.0.1
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
character-set-client-handshake=FALSE
character-set-server=utf8mb4
collation-server=utf8mb4_unicode_ci
init_connect='SET NAMES utf8mb4'
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
[client]
default-character-set=utf8mb4
[mysql]
default-character-set=utf8mb4
oracle
version: '2'
services:
oracle:
# sid: xe
# username: system
# password: oracle
image: sath89/oracle-xe-11g
restart: always #如果docker容器由于一些问题挂掉的化,docker-composer会自动把容器给启动起来
container_name: oracle #启动之后容器的名称
volumes:
- /my-docker-data/oracle-11g/data:/u01/app/oracle
ports:
- 1521:1521
postgres
version: '3.7'
services:
db:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: myadmin
TZ: PRC
deploy:
resources:
limits:
memory: 2G
volumes:
- ./data:/var/lib/postgresql/data
ports:
- 5432:5432
redis
version: '3.7'
services:
redis:
image: redis
container_name: redis
deploy:
resources:
limits:
memory: 200M
restart: always
ports:
- 6379:6379
network_mode: host
volumes:
- ./redis.conf:/etc/redis/redis.conf
- ./data:/data
requirepass dobell
#daemonize yes
bind 0.0.0.0
appendonly yes