Skip to content

Instantly share code, notes, and snippets.

@Akifcan
Created March 30, 2022 17:25
Show Gist options
  • Save Akifcan/ec301120cff30351b4d780799872e998 to your computer and use it in GitHub Desktop.
Save Akifcan/ec301120cff30351b4d780799872e998 to your computer and use it in GitHub Desktop.
my docker compose example
version: '3.7'
services:
postgres:
image: postgres:latest
restart: always
environment:
- POSTGRES_USER=campusUsername
- POSTGRES_PASSWORD=campusPassword
- POSTGRES_DB=campus_db
- [email protected]
- PGADMIN_DEFAULT_PASSWORD=admin
ports:
- 5433:5432
volumes:
- ./data/postgres:/data/postgres
container_name: db_postgres
redis:
image: docker.io/bitnami/redis:6.2
environment:
- ALLOW_EMPTY_PASSWORD=yes
- REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
ports:
- 6379:6379
volumes:
- ./data/redis:/data/redis
container_name: cache_redis
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.11.1
restart: always
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- xpack.security.enabled=false
- cluster.routing.allocation.disk.threshold_enabled=true
- cluster.routing.allocation.disk.watermark.low=2gb
- cluster.routing.allocation.disk.watermark.high=1gb
- cluster.routing.allocation.disk.watermark.flood_stage=512mb
- ES_JAVA_OPTS=-Xms500m -Xmx500m
ports:
- 9200:9200
volumes:
- ./data/elasticsearch:/usr/share/elasticsearch/data
container_name: campussocial_elasticsearch
kibana:
image: docker.elastic.co/kibana/kibana:7.11.1
restart: always
environment:
- SERVER_NAME=localhost
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
- xpack.security.enabled=false
depends_on:
- elasticsearch
ports:
- 5601:5601
container_name: campussocial_kibana
volumes:
data:
driver: local
networks:
local:
driver: bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment