Last active
July 22, 2026 21:55
-
-
Save gauravds/77385df81059ca4077e8e10ec8ad928f to your computer and use it in GitHub Desktop.
docker compose main and hasura configuration for local setup. Main has postgres-18+pgvector, pgadmin, hasura2.6 graphQL, redis-6, mysql-8, phpmyadmin, mongo, mongo-express, kafka, mailhog
This file contains hidden or 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.6' | |
| services: | |
| postgres: | |
| image: postgres | |
| restart: always | |
| platform: linux/amd64 | |
| environment: | |
| POSTGRES_PASSWORD: password | |
| volumes: | |
| - db_data:/var/lib/postgresql/data | |
| graphql-engine: | |
| image: hasura/graphql-engine:v2.36.3 | |
| platform: linux/arm64 | |
| ports: | |
| - '8080:8080' | |
| depends_on: | |
| - 'postgres' | |
| restart: always | |
| environment: | |
| HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:password@postgres:5432/postgres | |
| HASURA_GRAPHQL_ENABLE_CONSOLE: 'true' # set to "false" to disable console | |
| ## uncomment next line to set an admin secret | |
| HASURA_GRAPHQL_ADMIN_SECRET: password | |
| volumes: | |
| db_data: |
This file contains hidden or 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.1' | |
| services: | |
| redis: | |
| image: redis:6-alpine | |
| platform: linux/amd64 | |
| restart: unless-stopped | |
| container_name: redis | |
| ports: | |
| - '6379:6379' | |
| mysql: | |
| container_name: mysql | |
| image: mysql:8.0.28 | |
| command: --default-authentication-plugin=mysql_native_password --sql_mode=NO_ENGINE_SUBSTITUTION | |
| restart: always | |
| platform: linux/amd64 | |
| environment: | |
| MYSQL_ROOT_PASSWORD: root | |
| MYSQL_USER: dbuser | |
| MYSQL_PASSWORD: dbuser | |
| ports: | |
| - '3306:3306' | |
| phpmyadmin: | |
| image: phpmyadmin/phpmyadmin:latest | |
| restart: always | |
| platform: linux/amd64 | |
| environment: | |
| PMA_HOST: mysql | |
| PMA_USER: root | |
| PMA_PASSWORD: root | |
| ports: | |
| - '33036:80' | |
| qdrant: | |
| image: qdrant/qdrant | |
| container_name: qdrant | |
| ports: | |
| - '6333:6333' # REST | |
| - '6334:6334' # gRPC | |
| environment: | |
| QDRANT__SERVICE__API_KEY: root | |
| restart: unless-stopped | |
| # postgres: | |
| # image: postgres:18 | |
| # container_name: postgres | |
| # restart: always | |
| # platform: linux/amd64 | |
| # ports: | |
| # - '5432:5432' | |
| # environment: | |
| # POSTGRES_PASSWORD: root | |
| postgres: | |
| image: postgres:18 | |
| container_name: postgres | |
| restart: always | |
| platform: linux/amd64 | |
| ports: | |
| - '5432:5432' | |
| environment: | |
| POSTGRES_PASSWORD: root | |
| command: > | |
| bash -c " | |
| if [ ! -f /usr/share/postgresql/18/extension/vector.control ]; then | |
| echo 'pgvector not found. Installing postgresql-18-pgvector...' | |
| apt-get update && apt-get install -y postgresql-18-pgvector | |
| fi | |
| exec docker-entrypoint.sh postgres | |
| " | |
| pgadmin: | |
| image: dpage/pgadmin4 | |
| container_name: pgadmin | |
| restart: "no" | |
| ports: | |
| - '54321:80' | |
| environment: | |
| PGADMIN_DEFAULT_EMAIL: default@example.com | |
| PGADMIN_DEFAULT_PASSWORD: qwerty | |
| # not checked but I guess working. check below old commented 3.6 version that previously used. | |
| # graphql-engine: | |
| # image: hasura/graphql-engine:v2.36.3 | |
| # container_name: graphql-engine | |
| # restart: always | |
| # ports: | |
| # - '8080:8080' | |
| # depends_on: | |
| # - postgres | |
| # environment: | |
| # HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:root@postgres:5432/postgres | |
| # HASURA_GRAPHQL_ENABLE_CONSOLE: 'true' | |
| # HASURA_GRAPHQL_ADMIN_SECRET: password | |
| # mongo: | |
| # image: mongo:4.2.5 | |
| # restart: unless-stopped | |
| # ports: | |
| # - 27017:27017 | |
| # environment: | |
| # MONGODB_INITDB_ROOT_USERNAME: root | |
| # MONGODB_INITDB_ROOT_PASSWORD: root | |
| # mongo-express: | |
| # image: mongo-express:0.54 | |
| # restart: unless-stopped | |
| # ports: | |
| # - 27027:8081 | |
| # environment: | |
| # ME_CONFIG_MONGODB_ADMINUSERNAME: root | |
| # ME_CONFIG_MONGODB_ADMINPASSWORD: root | |
| # kafka: | |
| # image: landoop/fast-data-dev:2.6.2 | |
| # restart: unless-stopped | |
| # container_name: kafka | |
| # ports: | |
| # - '2181:2181' | |
| # - '3030:3030' | |
| # - '8081-8083:8081-8083' | |
| # - '9581-9585:9581-9585' | |
| # - '9092:9092' | |
| # environment: | |
| # ADV_HOST: '127.0.0.1' | |
| # mailhog: | |
| # image: mailhog/mailhog | |
| # container_name: mailhog | |
| # restart: "no" | |
| # ports: | |
| # - '1025:1025' | |
| # - '8025:8025' | |
| ################################### | |
| ##### Only support hasura and postgres | |
| ################################### | |
| # version: '3.6' | |
| # services: | |
| # postgres: | |
| # image: postgres | |
| # restart: always | |
| # platform: linux/amd64 | |
| # environment: | |
| # POSTGRES_PASSWORD: password | |
| # volumes: | |
| # - db_data:/var/lib/postgresql/data | |
| # graphql-engine: | |
| # image: hasura/graphql-engine:v2.36.3 | |
| # platform: linux/arm64 | |
| # ports: | |
| # - '8080:8080' | |
| # depends_on: | |
| # - 'postgres' | |
| # restart: always | |
| # environment: | |
| # HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:password@postgres:5432/postgres | |
| # HASURA_GRAPHQL_ENABLE_CONSOLE: 'true' # set to "false" to disable console | |
| # ## uncomment next line to set an admin secret | |
| # HASURA_GRAPHQL_ADMIN_SECRET: password | |
| # volumes: | |
| # db_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment