{"id":21037428,"url":"https://github.com/piinalpin/docker-compose-collection","last_synced_at":"2025-06-23T19:07:43.374Z","repository":{"id":111687762,"uuid":"392518722","full_name":"piinalpin/docker-compose-collection","owner":"piinalpin","description":"I created this docker configuration pool so that when I forget the configuration environment, I can reuse it.","archived":false,"fork":false,"pushed_at":"2025-01-26T05:58:16.000Z","size":3726,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-15T14:45:22.849Z","etag":null,"topics":["docker","docker-compose","shell","shell-script"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/piinalpin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-08-04T02:17:37.000Z","updated_at":"2025-01-26T05:58:19.000Z","dependencies_parsed_at":"2025-05-15T14:50:17.324Z","dependency_job_id":null,"html_url":"https://github.com/piinalpin/docker-compose-collection","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/piinalpin/docker-compose-collection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piinalpin%2Fdocker-compose-collection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piinalpin%2Fdocker-compose-collection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piinalpin%2Fdocker-compose-collection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piinalpin%2Fdocker-compose-collection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/piinalpin","download_url":"https://codeload.github.com/piinalpin/docker-compose-collection/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piinalpin%2Fdocker-compose-collection/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261539317,"owners_count":23174136,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","shell","shell-script"],"created_at":"2024-11-19T13:26:12.063Z","updated_at":"2025-06-23T19:07:38.354Z","avatar_url":"https://github.com/piinalpin.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Compose Collection\n\nI created this docker configuration pool so that when I forget the configuration environment, I can reuse it.\n\nBasic command :\n```bash\ndocker-compose -f $FILENAME up -d\ndocker-compose -f $FILENAME down -v\n```\n\n## Kafka CLI\n\nDownload docker compose configuration using curl\n\n```bash\ncurl -o kafka-cli.yml https://raw.githubusercontent.com/piinalpin/docker-compose-collection/master/kafka-cli.yaml\n```\n\nThis yaml `kafka-cli.yaml` will create a new container `zookeeper` and exposed port `2181` on host port. Also create a new container `kafka` and exposed port `29092`, `9092` and `9101` on host port.\n\n## Redis\n\nBy default there are 16 databases (indexed from 0 to 15) and you can navigate between them using `select` command. Number of databases can be changed in redis config file with `databases` setting.\n\nDownload docker compose configuration using curl\n\n```bash\ncurl -o redis.yml https://raw.githubusercontent.com/piinalpin/docker-compose-collection/master/redis.yaml\n```\n\nThis yaml `redis.yaml` will create a new container `redis` and exposed port `6379` on host port.\n\n**Redis CLI**\n\nRun `redis-cli`\n\n```bash\ndocker exec -it redis redis-cli\n```\n\nSelect the Redis logical database having the specified zero-based numeric index. New connections always use the database 0.\n\nChange database.\n\n```bash\nselect [INDEX]\n```\n\nSet and get key\n\n```bash\nset [KEY_NAME] [VALUE]\nget [KEY_NAME]\n```\n\n**Another Redis Desktop Manager**\n\nInstall [Another Redis Desktop Manager](https://formulae.brew.sh/cask/another-redis-desktop-manager) with homebrew. You can run with following command on your terminal.\n\n```bash\nbrew install cask \nbrew install --cask another-redis-desktop-manager\n```\n\nOpen the application, and should looks like below.\n\n![Another RDM](images/redis1.png)\n\nAnother Redis Desktop Manager dashboard\n\n![Another RDM - Dashboard](images/redis2.png)\n\nAnother Redis Desktop Manager add new key.\n\n![Another RDM - Add New Key](images/redis3.png)\n\n## MySQL\n\nDownload docker compose configuration using curl\n\n```bash\ncurl -o mysql.yml https://raw.githubusercontent.com/piinalpin/docker-compose-collection/master/mysql.yaml\n```\n\nThis yaml `mysql.yaml` will create a new container `mysql` and exposed port `3306` on host port.\n\nCreate network `my-network` if does not exists\n\n```bash\ndocker network create my-network\n```\n\nCreate volume `mysql-data` to persist data then run `docker-compose`\n\n```bash\ndocker volume create mysql-data\n```\n\n**MySQL CLI**\n\nRun this command to run MySQL command on container. Default user is `root` and password `SevenEightTwo782` you can change the password in `yaml` file.\n\n```bash\ndocker exec -it mysql bash\n```\n\n**Basic command:**\n\n-   Login into database, then type your password\n    ```bash\n    mysql -u root -p\n    ```\n-   Get list of databases\n    ```sql\n    show databases;\n    ```\n-   Create database and use database\n    ```sql\n    create database $DB_NAME;\n    use $DB_NAME;\n    ```\n## PostgreSQL\n\nDownload docker compose configuration using curl\n\n```bash\ncurl -o postgresql.yml https://raw.githubusercontent.com/piinalpin/docker-compose-collection/master/postgresql.yaml\n```\n\nThis yaml `postgresql.yaml` will create a new container `postgresql` and exposed port `5432` on host port.\n\nCreate network `my-network` if does not exists\n\n```bash\ndocker network create my-network\n```\n\nCreate volume `postgre-data` to persist data then run `docker-compose`\n\n```bash\ndocker volume create postgre-data\n```\n\n**Postgre SQL CLI**\n\nRun this command to run PostgreSQL command on container. Default user is `postgres` and password `SevenEightTwo782` you can change the password in `yaml` file.\n\n```bash\ndocker exec -it postgresql bash\n```\n\n**Basic command:**\n\n-   Login into database\n    ```bash\n    psql -Upostgres -w\n    ```\n-   Get list of databases\n    ```sql\n    \\l\n    ```\n-   Create database and use database\n    ```sql\n    create database $DB_NAME;\n    \\c $DB_NAME\n    ```\n\n## SQL Server\n\nDownload docker compose configuration using curl\n\n```bash\ncurl -o sqlserver.yml https://raw.githubusercontent.com/piinalpin/docker-compose-collection/master/sqlserver.yaml\n```\n\nThis yaml `sqlserver.yaml` will create a new container `sqlserver` and exposed port `1433` on host port.\n\nCreate network `my-network` if does not exists\n\n```bash\ndocker network create my-network\n```\n\nCreate volume `sqlserver-data` and `sqlserver-user` to persist data then run `docker-compose`\n\n```bash\ndocker volume create sqlserver-data \u0026\u0026 docker volume create sqlserver-user\n```\n\n**SQL Server CLI**\n\nRun this command to run SQL Server command on container. Default user is `sa` and password `SevenEightTwo782` you can change the password in `yaml` file.\n\n```bash\ndocker exec -it sqlserver /opt/mssql-tools/bin/sqlcmd -U sa -P SevenEightTwo782\n```\n\n**Basic command:**\n\n-   Get list of databases\n    ```sql\n    select name from sys.databases\n    go\n    ```\n-   Create database and use database\n    ```sql\n    create database $DB_NAME\n    go\n    ```\n\n## RabbitMQ\n\nDownload docker compose configuration using curl\n\n```bash\ncurl -o rabbitmq.yml https://raw.githubusercontent.com/piinalpin/docker-compose-collection/master/rabbitmq.yaml\n```\n\nThis yaml `rabbitmq.yaml` will create a new container `rabbitmq` and exposed port `5672` and `15672` on host port.\n\nCreate network `my-network` if does not exists\n\n```bash\ndocker network create my-network\n```\n\nCreate volume `rabbitmq-data` and `rabbitmq-log` to persist data then run `docker-compose`\n\n```bash\ndocker volume create rabbitmq-data \u0026\u0026 docker volume create rabbitmq-log\n```\n\n**RabbitMq Management**\n\nDefault RabbitMQ management user is `guest` and password is `guest`. Go to `localhost:15672` to acess RabbitMQ management.\n\n![RabbitMQ Management](images/rabbitmq-management.png)\n\n## Sonarqube\n\nDownload docker compose configuration using curl\n\n```bash\ncurl -o sonarqube.yml https://raw.githubusercontent.com/piinalpin/docker-compose-collection/master/sonarqube.yaml\n```\n\nThis yaml `sonarqube.yaml` will create a new container `sonarqube` and exposed port `9000` and `9002` on host port.\n\nCreate network `my-network` if does not exists\n\n```bash\ndocker network create my-network\n```\n\nCreate volume to persist data then run `docker-compose`\n\n```bash\ndocker volume create sonarqube-data \u0026\u0026 docker volume create sonarqube-extensions \u0026\u0026 docker volume create sonarqube-logs \u0026\u0026 docker volume create sonarqube-temp\n```\n\n**Sonarqube Management**\n\nDefault Sonarqube management user is `admin` and password is `admin`. Go to `localhost:9000` to acess Sonarqube management and then change the default password first.\n\n![Sonarqube Management](images/sonarqube-management.png)\n\n## MongoDB\nDownload docker compose configuration using curl\n\n```bash\ncurl -o mongodb.yaml https://raw.githubusercontent.com/piinalpin/docker-compose-collection/master/mongodb.yaml\n```\n\nThis yaml `mongodb.yaml` will create a new container `mongodb` and exposed port `27017` on host port.\n\nCreate network `my-network` if does not exists\n\n```bash\ndocker network create my-network\n```\n\nCreate volume to persist data then run `docker-compose`\n\n```bash\ndocker volume create mongodb-data \u0026\u0026 docker volume create mongodb-config\n```\n\n**MongoDB CLI**\nRun this command to run MongoDB command on container. Default user is `root` and password `SevenEightTwo782` you can change the password in `yaml` file.\n\n```bash\ndocker exec -it mongodb mongo -u root -p SevenEightTwo782 --authenticationDatabase admin \u003cSOME_DATABASE\u003e\n```\n\n**Basic command:**\n\n-   Get list of databases\n    ```js\n    show dbs\n    ```\n-   Create database and use database\n    ```js\n    use some_db\n    db\n    ```\n-   Create collection\n    ```js\n    db.createCollection('some_collection');\n    ```\n-   Insert row\n    ```js\n    db.some_db.insertMany([\n        {\n            _id: 1,\n            first_name: \"Maverick\",\n            last_name: \"Johnson\",\n            gender: 1\n        },\n        {\n            _id: 2,\n            first_name: \"Calvin\",\n            last_name: \"Joe\",\n            gender: 1\n        },\n        {\n            _id: 3,\n            first_name: \"Kagura\",\n            last_name: \"Otsusuki\",\n            gender: 0\n        }\n    ]);\n    ```\n- Find row\n    ```js\n    db.some_db.find();\n    ```\n- Update row\n    ```js\n    db.test.updateOne({_id: 1}, {$set: {\n        first_name: \"Maverick\",\n        last_name: \"Johnson Updated\",\n        gender: 1\n    }});\n    ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiinalpin%2Fdocker-compose-collection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiinalpin%2Fdocker-compose-collection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiinalpin%2Fdocker-compose-collection/lists"}