{"id":16026959,"url":"https://github.com/acim/go-reflex","last_synced_at":"2025-05-12T03:32:14.840Z","repository":{"id":38729947,"uuid":"153163861","full_name":"acim/go-reflex","owner":"acim","description":"Docker image for auto-recompiling and auto-restarting Golang server application","archived":false,"fork":false,"pushed_at":"2025-05-06T22:37:54.000Z","size":308,"stargazers_count":51,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-06T23:28:23.315Z","etag":null,"topics":["auto-recompiling","docker","docker-image","golang","race-detector"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/acim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-10-15T18:39:57.000Z","updated_at":"2025-05-06T22:37:55.000Z","dependencies_parsed_at":"2024-01-10T11:52:10.887Z","dependency_job_id":"222b8262-c7be-4772-aac4-9e8f73e76624","html_url":"https://github.com/acim/go-reflex","commit_stats":{"total_commits":226,"total_committers":3,"mean_commits":75.33333333333333,"dds":0.3938053097345132,"last_synced_commit":"2f56adb00624aa3b23fd84b94a7966bc9e4cb03f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acim%2Fgo-reflex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acim%2Fgo-reflex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acim%2Fgo-reflex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acim%2Fgo-reflex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acim","download_url":"https://codeload.github.com/acim/go-reflex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253668121,"owners_count":21944985,"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":["auto-recompiling","docker","docker-image","golang","race-detector"],"created_at":"2024-10-08T20:04:20.615Z","updated_at":"2025-05-12T03:32:14.587Z","avatar_url":"https://github.com/acim.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker image for auto-recompiling and auto-restarting Golang server application\n\n[![build](https://github.com/acim/go-reflex/actions/workflows/build.yml/badge.svg)](https://github.com/acim/go-reflex/actions/workflows/build.yml)\n[![Docker Pulls](https://img.shields.io/docker/pulls/acim/go-reflex?logo=docker\u0026label=pulls)](https://hub.docker.com/r/acim/go-reflex)\n[![Docker Stars](https://img.shields.io/docker/stars/acim/go-reflex?logo=docker\u0026label=stars)](https://hub.docker.com/r/acim/go-reflex)\n![Docker Architecture](https://img.shields.io/badge/arch-amd64-blue?logo=docker)\n![Docker Architecture](https://img.shields.io/badge/arch-arm64-blue?logo=docker)\n![Docker Image Version (latest by date)](https://img.shields.io/docker/v/acim/go-reflex?logo=docker)\n\n## Features\n\n- works with [docker-compose](https://github.com/docker/compose) and [kind](https://github.com/kubernetes-sigs/kind)\n- uses [cespare/reflex](https://github.com/cespare/reflex) to watch .go and .html files changes and recompile/restart your server application\n- optionally compiles with data race detector\n- supports amd64 and arm64 architectures\n\n## Feature requests\n\n- please open a [new issue](https://github.com/acim/go-reflex/issues/new)\n\n## How to use with docker-compose\n\nPlace docker-compose.yml in your project root and run `docker-compose up --build`.\n\n### docker-compose.yml example with main package in the root of the project\n\n```yaml\nversion: '3.8'\n\nservices:\n  myservice:\n    image: acim/go-reflex\n    environment:\n      - RACE_DETECTOR=1\n    volumes:\n      - .:/app\n    ports:\n      - 3000:3000\n```\n\nNote: Replace port number with correct port number of your application.\n\n### docker-compose.yml example with main package not in the root of the project\n\n```yaml\nversion: '3.8'\n\nservices:\n  myservice:\n    image: acim/go-reflex\n    environment:\n      - RACE_DETECTOR=1\n      - BUILD_ARGS=./cmd/server/server.go\n    volumes:\n      - .:/app\n    ports:\n      - 3000:3000\n```\n\n### docker-compose.yml example with installation of external dependencies\n\n```yaml\nversion: '3.8'\n\nservices:\n  myservice:\n    image: acim/go-reflex\n    environment:\n      - RACE_DETECTOR=1\n      - APT_INSTALL=libraw-dev\n    volumes:\n      - .:/app\n    ports:\n      - 3000:3000\n```\n\n## How to use with kind (Kubernetes)\n\n### Install kind\n\n```sh\ngo install sigs.k8s.io/kind@latest\n```\n\n### Create local cluster\n\n```sh\nkind create cluster --config=config.yaml\n```\n\n### config.yaml example\n\n```yaml\napiVersion: kind.x-k8s.io/v1alpha4\nkind: Cluster\nnodes:\n  - role: control-plane\n    extraMounts:\n      - hostPath: /path/to/your/project/root\n        containerPath: /app\n```\n\n### Deploy your application\n\n```sh\nkubectl apply -f deploy.yaml\n```\n\n### deploy.yaml example\n\n```yaml\napiVersion: v1\nkind: Pod\nmetadata:\n  name: your-app-name\n  namespace: default\nspec:\n  containers:\n    - image: acim/go-reflex\n      name: your-app-name\n      env:\n        - name: RACE_DETECTOR\n          value: '1'\n      volumeMounts:\n        - mountPath: /app\n          name: app\n  restartPolicy: Never\n  volumes:\n    - hostPath:\n        path: /app\n      name: app\n```\n\n### Start port-forwarding\n\n```sh\nkubectl port-forward your-app-name 3000:3000\n```\n\nNote: Replace port number with correct port number of your application.\n\n## Optional environment variables\n\n- RACE_DETECTOR=1 - used to turn on data race detector to the compiled binary\n- RUN_ARGS - used to add subcommands and/or flags in the call of your binary (i.e. serve --verbose)\n- BUILD_ARGS - used to add flags to go build command (i.e. \"./cmd/myapp/main.go\")\n- APT_INSTALL - used to install additional packages (experimental and not efficient)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facim%2Fgo-reflex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facim%2Fgo-reflex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facim%2Fgo-reflex/lists"}