Last active
September 26, 2022 05:10
-
-
Save nasrulfuad/804ba24c741243ece0ae9d7738abffc9 to your computer and use it in GitHub Desktop.
Setup web development with docker compose
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
version: "3.7" | |
services: | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:7.12.1 | |
container_name: elastic | |
environment: | |
- node.name=elasticsearch | |
- http.port=9200 | |
- http.host=0.0.0.0 | |
- transport.host=127.0.0.1 | |
- cluster.name=es-docker-cluster | |
- discovery.seed_hosts=elasticsearch | |
- cluster.initial_master_nodes=elasticsearch | |
- bootstrap.memory_lock=true | |
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" | |
ulimits: | |
memlock: | |
soft: -1 | |
hard: -1 | |
volumes: | |
- es_data:/var/lib/elasticsearch | |
ports: | |
- 9200:9200 | |
volumes: | |
es_data: {} |
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
version: "3.5" | |
services: | |
mongo: | |
container_name: mongo | |
image: mongo | |
environment: | |
MONGO_INITDB_ROOT_USERNAME: root | |
MONGO_INITDB_ROOT_PASSWORD: password | |
ports: | |
- "27017:27017" | |
volumes: | |
- mongo:/data/db | |
restart: unless-stopped | |
volumes: | |
mongo: |
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
version: "3.5" | |
services: | |
mysql: | |
container_name: mysql | |
image: mysql | |
environment: | |
MYSQL_ROOT_PASSWORD: password | |
volumes: | |
- mysql:/var/lib/mysql | |
ports: | |
- "3306:3306" | |
networks: | |
- mysql | |
restart: unless-stopped | |
phpmyadmin: | |
container_name: phpmyadmin | |
image: phpmyadmin | |
ports: | |
- "82:80" | |
volumes: | |
- mysql:/etc/phpmyadmin/config.user.inc.php | |
links: | |
- mysql:db | |
networks: | |
- mysql | |
restart: unless-stopped | |
networks: | |
mysql: | |
driver: bridge | |
volumes: | |
mysql: |
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
version: "3.5" | |
services: | |
nats: | |
container_name: nats | |
image: nats:alpine | |
ports: | |
- 4222:4222 | |
- 8222:8222 | |
- 6222:6222 | |
restart: "no" |
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
version: "3.5" | |
services: | |
postgres: | |
container_name: psql | |
image: postgres:alpine3.14 | |
environment: | |
- POSTGRES_USER=root | |
- POSTGRES_PASSWORD=password | |
- POSTGRES_DB=db | |
volumes: | |
- .dbdata:/var/lib/postgresql/data | |
ports: | |
- 5432:5432 | |
restart: unless-stopped |
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
version: "3.5" | |
services: | |
redis: | |
container_name: rabbitmq | |
image: rabbitmq:management-alpine | |
ports: | |
- 5672:5672 | |
- 15672:15672 | |
environment: | |
RABBITMQ_DEFAULT_USER: admin | |
RABBITMQ_DEFAULT_PASS: admin | |
restart: "no" |
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
version: "3.5" | |
services: | |
redis: | |
container_name: redis | |
image: redis | |
ports: | |
- "6379:6379" | |
restart: unless-stopped |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment