Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

github.com/dkfbasel/hot-reload

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/dkfbasel/hot-reload


Version published
Created
Source

Hot-reload Development for Go in Docker Containers

This directory contains the source code for the image dkfbasel/hot-reload-go. It will compile and start the go program linked into the container specified under directory (/app per default) and automatically recompile and reload the program when any file changes.

Please note that go modules is required for it to work.

docker-compose.yml
------------------

version: '3'

services:

    api:
        image: dkfbasel/hot-reload-go:1.17.7
        ports:
            - "3001:80"
        volumes:
            # mount the project into the docker container. Must use go modules.
            - ..:/app
            # mount modules directory from source code or as docker volume to
            # cache go modules
            - ../_modules:/go/pkg/mod
        environment:
            # directory to look for the main go entry point (default: /app)
            - DIRECTORY=/app
            # specify the command that should be run, can be 'build' or 'test'
            # 'build' is the default command 
            - CMD=build
            # arguments can be used to specify arguments to pass to the executable
            # on running
            - ARGS=-test=someString
            # ignore will indicate which files and subdirectories to ignore from 
            # watching, note that the path will be matched from the src directory
            - IGNORE=/cmd/web,*.md
        

FAQs

Package last updated on 16 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc