I'm trying to set up golang environment as described in this great post. I'm using Docker on OS X 10.10 with boot2docker (v1.3.0) and fig.sh (1.0.1). Everything runs fine, but revel's hot-reload not working at all. Anyone experienced same problem or know any workaround to make hot-reload work? Revel framework version 0.11.1
Golang revel framework hot-reload in docker environment
1.1k views Asked by yoma At
2
There are 2 answers
0
Eutychus
On
How about something like this for a Dockerfile
FROM golang:1.17.2-alpine AS build
# Add required packages
RUN apk add --update git curl bash
# Install revel framework
RUN go get -u github.com/revel/revel
RUN go get -u github.com/revel/cmd/revel
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
ENV CGO_ENABLED 0
ADD . .
ENTRYPOINT revel run
Then run using something like docker compose:
version: '3.9'
services:
go-revel-crud:
build:
context: .
dockerfile: ./Dockerfile.local
ports:
- 8090:8090
volumes:
- .:/app
environment:
- ENV=dev
- PORT=8090
Mounting the volume for current directory to the working dir /app.
Checkout this guide with full explaination
Related Questions in GO
- How do I get all the attributes of an XML element using Go?
- Type cast custom types to base types
- Why are Revel optional func parameters in controller not working? CRUD code redundancy
- Streaming commands output progress
- single ampersand between 2 expressions
- golang goroutine use SSHAgent auth doesn't work well and throw some unexpect panic
- How do I do a literal *int64 in Go?
- Emulating `docker run` using the golang docker API
- How to print contents of channel without changing it
- Golang time zone parsing not returning the correct zone on ubuntu server
- Is os.File's Write() threadsafe?
- How to get the pointer of return value from function call?
- How do I represent an Optional String in Go?
- Fibonacci in Go using channels
- Boltdb-key-Value Data Store purely in Go
Related Questions in DOCKER
- Docker, redirecting to virtualbox port
- Collect only from STDERR when using Docker syslog logging driver
- How can I create a docker image from the current system?
- Moving Docker Containers Around
- How can I test with serverspec that Jenkins is running in a jenkins docker container?
- How to deploy django 1.8 on Elastic Beanstalk using Docker
- Emulating `docker run` using the golang docker API
- Where are docker images and containers stored when we use it with Windows?
- docker compose, vagrant and insecure Repository
- Commit data in a mysql container
- oh-my-zsh installation returns non zero code
- Use custom docker binary in CoreOS
- Can I use docker image ubuntu 14.04 if my host is 12.04?
- Hide/obfuscate environmental parameters in docker
- How to add initial users when starting a RabbitMQ Docker container?
Related Questions in OSX-YOSEMITE
- Looking the Method that MANUALLY INSTALL PHP on OSX Yosemite
- NSString caseInsensitiveCompare confusing ordering
- phpinfo reads php5.5 instead of php5.6
- compiling caffe on Yosemite
- In OS X 10.10, can I implement an NSControl without an NSCell?
- Cannot run MySQL after unzipping from a tar archive
- OSX Yosemite Dock magnification disabled
- How can I customize the behavior of the green 'expand window' button so that it only maximizes (instead of taking over the entire screen)?
- Where is chrome.storage.local stored for Chrome Apps?
- PyGame Installation Mac OS X
- CalledProcessError with buildozer and kivy on OSX Yosemite
- sbt stuck at Getting org.scala-sbt sbt 0.13.8 ... on Mac OS X Yosemite with Java 8 and scala 2.11.6
- Xcode 7 run on Mac OSX 10.10 Yosemite
- Focus border not appearing on html button or select in Google Chrome (Only OSX 10.10.3)
- No pythonw in Python 3.4 OS X 10.10?
Related Questions in REVEL
- Why are Revel optional func parameters in controller not working? CRUD code redundancy
- how to reference a relative file from code and tests
- Go pprof: Got Error unrecognized profile format
- Golang Revel Job spec every 1st monday on every month
- Golang return nil
- Revel: "code does not compile: undefined: models"
- Golang revel framework hot-reload in docker environment
- Go net/http request
- Pulling model directly from Revel template engine
- Print the current index of a slice when iterating using the html/template package
- I cannot get posted body in revel go framework
- Taking GET parameters as func arguments or using c.Params.Get() in Golang Revel
- Golang requirements.txt equivalent
- Output all language strings in Revel?
- How can I deploy revel web app on Openshift?
Related Questions in FIG
- Docker Compose with one Terminating Container
- How to have multiple django requirements file mentioned in fig file for docker deployment across dev, staging and prod servers?
- Keeping a Play framework app running in a Docker container without a pseudo-TTY
- Configure fig to run one container before another
- Golang revel framework hot-reload in docker environment
- Installing mongo client in a Docker container
- How do i automatically load code changes using docker fig
- Seeding data in a Mongo db within a linked Docker container
- Alternative to fig.sh for node.js?
- fig throws exception after installation
- Should Fig be on inside of Vagrant VM or outside for OSX?
- Fig Python 3 Compatible?
- Nodemon is not working in Docker environment
- Fig support on Boot2Docker / Windows platform
- Starting fig process with supervisor
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Boot2docker uses VirtualBox, and I'm assuming vboxsf for shared folders. vboxsf doesn't notify about changed files. Try keeping the files completely inside the virtual machine. Does that help?