go-cloud Docker & Self-Hosted Deployment

GitHub

The Go Cloud Development Kit (Go CDK): A library and tools for open cloud development in Go.

9,915 stars Go Go 12 files ยท ~16,419 tokens #aws#azure#cloud#gcp#go#golang#hybrid-cloud#multi-cloud
RAW Compose
1. Pull Image (DOCKERHUB) docker pull library/mongo
2. Docker Run (1-Click Launch) docker run -d --name go-cloud -p 27017:27017 --restart always mongo:4.4
3. Podman Run podman run -d --name go-cloud -p 27017:27017 --restart always mongo:4.4
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/library/mongo:4.4
5. ORAS Pull (OCI Artifact) oras pull mongo:4.4
6. Compose Deployment docker compose up -d
docstore/mongodocstore/docker-compose.yml
Download .yml
services:
  mongo:
    image: mongo:4.4
    container_name: mongo
    restart: always
    volumes:
      - mongo_data:/data/db
    ports:
      - "27017:27017"
    command: ["--replSet", "dbrs", "--bind_ip_all"]

  mongosetup:
    image: mongo:4.4
    container_name: mongosetup
    depends_on:
      - mongo
    entrypoint: >
      bash -c "sleep 5 &&
      mongo --host mongo:27017 --eval '
        rs.initiate({
          _id: \"dbrs\",
          members: [
            { _id: 0, host: \"mongo:27017\"}
          ]
        })
      '"

volumes:
  mongo_data: