Skip to content

Instantly share code, notes, and snippets.

@rdeak
Created February 19, 2021 20:21
Show Gist options
  • Save rdeak/5c5bd18b4565ed87d4c5ce2c587725f0 to your computer and use it in GitHub Desktop.
Save rdeak/5c5bd18b4565ed87d4c5ce2c587725f0 to your computer and use it in GitHub Desktop.
List of popular server images
version: '2.4'
volumes:
esdata:
driver: local
networks:
backend:
driver: bridge
services:
proxy:
image: nginx:1.19.6
ports:
- "4000:4000"
volumes:
- ./docker-assets/nginx/config/nginx.conf:/etc/nginx/conf.d/default.conf
- ./docker-assets/nginx/certs:/etc/ssl/private
networks:
- backend
restart: unless-stopped
postgres:
image: postgres:12.2
command: postgres -c config_file=/config/postgresql.conf
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- '5432:5432'
volumes:
- ./docker-assets/pg/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
- ./docker-assets/pg/data:/var/lib/postgresql/data
- ./docker-assets/pg/postgresql.conf:/config/postgresql.conf
networks:
- backend
healthcheck:
test: pg_isready -U postgres -h 127.0.0.1
restart: unless-stopped
pgAdmin:
image: dpage/pgadmin4:4.23
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: pass
ports:
- '54329:80'
volumes:
- ./docker-assets/pgadmin4/data:/var/lib/pgadmin
networks:
- backend
restart: unless-stopped
mongo:
image: mongo:4.2.8
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: root
MONGO_INITDB_DATABASE: sandbox
MONGO_USERNAME: user
MONGO_PASSWORD: user
ports:
- '27017-27019:27017-27019'
volumes:
- ./docker-assets/mongo/data:/data/db
- ./docker-assets/mongo/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
networks:
- backend
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo localhost:27017/test --quiet
restart: unless-stopped
redis:
image: redis:6.0.8-alpine
ports:
- '6379:6379'
networks:
- backend
healthcheck:
test: redis-cli ping
restart: unless-stopped
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.2
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
ports:
- '9200:9200'
volumes:
- ./docker-assets/es/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
- esdata:/usr/share/elasticsearch/data
networks:
- backend
healthcheck:
test: curl -s http://localhost:9200/_cluster/health | grep -vq '"status":"red"'
restart: unless-stopped
kibana:
image: docker.elastic.co/kibana/kibana:7.10.2
environment:
- ELASTICSEARCH_HOSTS=["http://elasticsearch:9200"]
ports:
- '5601:5601'
networks:
- backend
depends_on:
elasticsearch:
condition: service_healthy
healthcheck:
test: curl --write-out 'HTTP %{http_code}' --fail --silent --output /dev/null http://localhost:5601/api/status
restart: unless-stopped
metricbeat:
user: root
image: docker.elastic.co/beats/metricbeat:7.10.2
command: metricbeat -e -E output.elasticsearch.hosts=["elasticsearch:9200"] -strict.perms=false
environment:
- KIBANA_HOST=kibana
- MONGO_USERNAME=root
- MONGO_PASSWORD=root
- POSTGRES_USER=postgres
- POSTGRES_PASS=postgres
volumes:
- ./docker-assets/metricbeat/metricbeat.yml:/usr/share/metricbeat/metricbeat.yml:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- /sys/fs/cgroup:/hostfs/sys/fs/cgroup:ro
- /proc:/hostfs/proc:ro
- /:/hostfs:ro
networks:
- backend
depends_on:
elasticsearch:
condition: service_healthy
kibana:
condition: service_healthy
restart: on-failure
apm-server:
image: docker.elastic.co/apm/apm-server:7.10.2
cap_add: [ "CHOWN", "DAC_OVERRIDE", "SETGID", "SETUID" ]
cap_drop: [ "ALL" ]
ports:
- 8200:8200
command: >
apm-server -e
-E apm-server.rum.enabled=true
-E setup.kibana.host=kibana:5601
-E setup.template.settings.index.number_of_replicas=0
-E apm-server.kibana.enabled=true
-E apm-server.kibana.host=kibana:5601
-E output.elasticsearch.hosts=["elasticsearch:9200"]
networks:
- backend
depends_on:
elasticsearch:
condition: service_healthy
kibana:
condition: service_healthy
healthcheck:
test: curl --write-out 'HTTP %{http_code}' --fail --silent --output /dev/null http://localhost:8200/
logstash:
image: logstash:7.9.3
environment:
LS_JAVA_OPTS: "-Xmx256m -Xms256m"
ports:
- "5044:5044"
- "5000:5000/tcp"
- "5000:5000/udp"
- "9600:9600"
volumes:
- ./docker-assets/logstash/pipeline:/usr/share/logstash/pipeline
networks:
- backend
depends_on:
elasticsearch:
condition: service_healthy
restart: unless-stopped
mysql:
image: mysql:5.7
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 1
ports:
- "3306:3306"
volumes:
- nodemysqldata:/var/lib/mysql
networks:
- backend
healthcheck:
test: [ "CMD", "mysql" ,"-h", "mysql", "-P", "3306", "-u", "root", "-e", "SELECT 1" ]
restart: unless-stopped
mssql:
image: microsoft/mssql-server-linux
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=Very(!)Secure
- MSSQL_PID=Developer
ports:
- "1433:1433"
volumes:
- nodemssqldata:/var/opt/mssql
networks:
- backend
healthcheck:
test: [ "CMD", "/opt/mssql-tools/bin/sqlcmd", "-S", "mssql", "-U", "sa", "-P", "Very(!)Secure", "-Q", "select 1" ]
restart: unless-stopped
cassandra:
image: cassandra:3
environment:
MAX_HEAP_SIZE: "1G"
HEAP_NEWSIZE: 400m
ports:
- "9042:9042"
volumes:
- nodecassandradata:/var/lib/cassandra
networks:
- backend
healthcheck:
test: [ "CMD-SHELL", "[ $$(nodetool statusgossip) = running ]" ]
restart: unless-stopped
memcached:
image: memcached:alpine
user: "11211"
ports:
- "11211:11211"
networks:
- backend
healthcheck:
test: [ "CMD", "nc", "127.0.0.1:11211", "-z" ]
restart: unless-stopped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment