-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: mdk <[email protected]>
- Loading branch information
Showing
5 changed files
with
266 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,234 @@ | ||
version: "2.4" | ||
|
||
services: | ||
|
||
traefik: | ||
image: "traefik:v2.2" | ||
container_name: "traefik_ems" | ||
command: | ||
#- "--log.level=DEBUG" | ||
- "--api.insecure=true" | ||
- "--providers.docker=true" | ||
- "--providers.docker.exposedbydefault=false" | ||
- "--entrypoints.web.address=:80" | ||
- "--entrypoints.websecure.address=:443" | ||
ports: | ||
- "80:80" | ||
- "443:443" | ||
- "8888:8080" | ||
volumes: | ||
- "/var/run/docker.sock:/var/run/docker.sock:ro" | ||
|
||
# This image is a small and easy application to test traefik's configuration | ||
# whoami: | ||
# image: "containous/whoami" | ||
# container_name: "simple-service" | ||
# labels: | ||
# - "traefik.enable=true" | ||
# - "traefik.http.routers.whoami.rule=Host(`whoami.localhost`)" | ||
# - "traefik.http.routers.whoami.entrypoints=web" | ||
# - "traefik.http.routers.whoami-tls.tls=true" | ||
# - "traefik.http.routers.whoami-tls.rule=Host(`whoami.localhost`)" | ||
# - "traefik.http.routers.whoami-tls.entrypoints=websecure" | ||
|
||
es01: | ||
image: docker.elastic.co/elasticsearch/elasticsearch:7.11.2 | ||
container_name: es01 | ||
environment: | ||
- node.name=es01 | ||
- cluster.name=es7-docker-cluster | ||
- discovery.seed_hosts=es02,es03 | ||
- cluster.initial_master_nodes=es01,es02,es03 | ||
- cluster.routing.allocation.disk.threshold_enabled=false | ||
- bootstrap.memory_lock=true | ||
- node.store.allow_mmap=false | ||
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" | ||
ulimits: | ||
memlock: | ||
soft: -1 | ||
hard: -1 | ||
ports: | ||
- 9200:9200 | ||
volumes: | ||
- data01:/usr/share/elasticsearch/data | ||
labels: | ||
- "traefik.enable=true" | ||
- "traefik.http.routers.es.rule=Host(`es.localhost`)" | ||
- "traefik.http.routers.es.entrypoints=web" | ||
- "traefik.http.routers.es.service=es" | ||
- "traefik.http.services.es.loadbalancer.server.port=9200" | ||
es02: | ||
image: docker.elastic.co/elasticsearch/elasticsearch:7.11.2 | ||
container_name: es02 | ||
environment: | ||
- node.name=es02 | ||
- cluster.name=es7-docker-cluster | ||
- discovery.seed_hosts=es01,es03 | ||
- cluster.initial_master_nodes=es01,es02,es03 | ||
- cluster.routing.allocation.disk.threshold_enabled=false | ||
- bootstrap.memory_lock=true | ||
- node.store.allow_mmap=false | ||
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" | ||
ulimits: | ||
memlock: | ||
soft: -1 | ||
hard: -1 | ||
volumes: | ||
- data02:/usr/share/elasticsearch/data | ||
labels: | ||
- "traefik.enable=true" | ||
- "traefik.http.routers.es.rule=Host(`es.localhost`)" | ||
- "traefik.http.routers.es.entrypoints=web" | ||
- "traefik.http.routers.es.service=es" | ||
- "traefik.http.services.es.loadbalancer.server.port=9200" | ||
es03: | ||
image: docker.elastic.co/elasticsearch/elasticsearch:7.11.2 | ||
container_name: es03 | ||
environment: | ||
- node.name=es03 | ||
- cluster.name=es7-docker-cluster | ||
- discovery.seed_hosts=es01,es02 | ||
- cluster.initial_master_nodes=es01,es02,es03 | ||
- cluster.routing.allocation.disk.threshold_enabled=false | ||
- bootstrap.memory_lock=true | ||
- node.store.allow_mmap=false | ||
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" | ||
ulimits: | ||
memlock: | ||
soft: -1 | ||
hard: -1 | ||
volumes: | ||
- data03:/usr/share/elasticsearch/data | ||
labels: | ||
- "traefik.enable=true" | ||
- "traefik.http.routers.es.rule=Host(`es.localhost`)" | ||
- "traefik.http.routers.es.entrypoints=web" | ||
- "traefik.http.routers.es.service=es" | ||
- "traefik.http.services.es.loadbalancer.server.port=9200" | ||
|
||
kibana: | ||
container_name: kibana | ||
image: docker.elastic.co/kibana/kibana:7.9.2 | ||
ports: | ||
- 5601:5601 | ||
environment: | ||
- TZ=Europe/Brussels | ||
- ELASTICSEARCH_HOSTS=http://es01:9200 | ||
- SERVER_NAME=kibana.localhost | ||
labels: | ||
- "traefik.enable=true" | ||
- "traefik.http.routers.kibana.rule=Host(`kibana.localhost`)" | ||
- "traefik.http.routers.kibana.entrypoints=web" | ||
- "traefik.http.routers.kibana.service=kibana" | ||
- "traefik.http.services.kibana.loadbalancer.server.port=5601" | ||
|
||
postgres: | ||
container_name: postgres | ||
image: postgres:12 | ||
ports: | ||
- "5432:5432" | ||
environment: | ||
- POSTGRES_PASSWORD=adminpg | ||
- TZ=Europe/Brussels | ||
- PUID=1000 | ||
- PGID=1000 | ||
volumes: | ||
- postgres:/var/lib/postgresql/data | ||
- ../configs/samples:/opt/samples | ||
|
||
mariadb: | ||
image: linuxserver/mariadb | ||
container_name: mariadb | ||
ports: | ||
- "3306:3306" | ||
environment: | ||
- PUID=1000 | ||
- PGID=1000 | ||
- MYSQL_ROOT_PASSWORD=mariadb | ||
- TZ=Europe/Brussels | ||
volumes: | ||
- mariadb:/config | ||
|
||
tika: | ||
image: apache/tika | ||
container_name: tika | ||
ports: | ||
- "9998:9998" | ||
labels: | ||
- "traefik.enable=true" | ||
- "traefik.http.routers.tika.rule=Host(`tika.localhost`)" | ||
- "traefik.http.routers.tika.entrypoints=web" | ||
|
||
minio: | ||
image: minio/minio | ||
container_name: minio | ||
volumes: | ||
- s3:/data | ||
ports: | ||
- 9000:9000 | ||
environment: | ||
MINIO_ACCESS_KEY: accesskey | ||
MINIO_SECRET_KEY: secretkey | ||
command: server /data --console-address ":9001" | ||
healthcheck: | ||
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] | ||
interval: 30s | ||
timeout: 20s | ||
retries: 3 | ||
labels: | ||
- "traefik.enable=true" | ||
- "traefik.http.routers.minio.rule=Host(`minio.localhost`)" | ||
- "traefik.http.routers.minio.service=minio" | ||
- "traefik.http.routers.minio.entrypoints=web" | ||
- "traefik.http.services.minio.loadbalancer.server.port=9001" | ||
|
||
redis: | ||
image: centos/redis-5-centos7 | ||
container_name: redis | ||
ports: | ||
- 6379:6379 | ||
volumes: | ||
- redis:/var/lib/redis/data | ||
|
||
redis-commander: | ||
image: rediscommander/redis-commander:latest | ||
environment: | ||
- REDIS_HOSTS=local:redis:6379 | ||
labels: | ||
- "traefik.enable=true" | ||
- "traefik.http.routers.redis-commander.rule=Host(`redis-commander.localhost`)" | ||
- "traefik.http.routers.redis-commander.service=redis-commander" | ||
- "traefik.http.routers.redis-commander.entrypoints=web" | ||
- "traefik.http.services.redis-commander.loadbalancer.server.port=8081" | ||
|
||
mailhog: | ||
image: mailhog/mailhog | ||
container_name: mailhog_ems | ||
ports: | ||
- 1025:1025 # smtp server | ||
#- 8025:8025 # web ui | ||
labels: | ||
- "traefik.enable=true" | ||
- "traefik.http.routers.mailhog.rule=Host(`mailhog.localhost`)" | ||
- "traefik.http.routers.mailhog.service=mailhog" | ||
- "traefik.http.routers.mailhog.entrypoints=web" | ||
- "traefik.http.routers.mailhog-tls.rule=Host(`mailhog.localhost`)" | ||
- "traefik.http.routers.mailhog-tls.service=mailhog" | ||
- "traefik.http.routers.mailhog-tls.entrypoints=websecure" | ||
- "traefik.http.routers.mailhog-tls.tls=true" | ||
- "traefik.http.services.mailhog.loadbalancer.server.port=8025" | ||
volumes: | ||
data01: | ||
driver: local | ||
data02: | ||
driver: local | ||
data03: | ||
driver: local | ||
redis: | ||
driver: local | ||
s3: | ||
driver: local | ||
mariadb: | ||
driver: local | ||
postgres: | ||
driver: local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#/bin/bash | ||
|
||
#sh pg_drop.sh | ||
|
||
docker-compose exec -e PGUSER=postgres -e PGPASSWORD=adminpg -T postgres psql -c "DROP DATABASE IF EXISTS $1;" | ||
docker-compose exec -e PGUSER=postgres -e PGPASSWORD=adminpg -T postgres psql -c "DROP USER IF EXISTS $1;" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#/bin/bash | ||
|
||
#sh pg_init.sh my_database schema_my_database_adm | ||
|
||
docker compose exec -e PGUSER=postgres -e PGPASSWORD=adminpg -T postgres psql -c "CREATE USER $1 WITH ENCRYPTED PASSWORD '$1';" | ||
docker compose exec -e PGUSER=postgres -e PGPASSWORD=adminpg -T postgres psql -c "CREATE DATABASE $1 WITH OWNER $1;" | ||
docker compose exec -e PGUSER=postgres -e PGPASSWORD=adminpg -T postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $1 TO $1;" | ||
docker compose exec -e PGUSER=postgres -e PGPASSWORD=adminpg -T postgres psql -d $1 -c "ALTER SCHEMA public OWNER TO $1;" | ||
docker compose exec -e PGUSER=postgres -e PGPASSWORD=adminpg -T postgres psql -d $1 -c "ALTER SCHEMA public RENAME TO $2" | ||
docker compose exec -e PGUSER=postgres -e PGPASSWORD=adminpg -T postgres psql -d $1 -c "ALTER USER $1 SET search_path TO $2;" | ||
docker compose exec -e PGUSER=postgres -e PGPASSWORD=adminpg -T postgres psql -d $1 -c "GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA $2 TO $1;" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters