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 best solutions below
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
- Go Fiber and HTMX - HX-Trigger header is changed to Hx-Trigger, which is not what HTMX is listening for
- Golang == Error: OCI runtime create failed: unable to start container process: exec: "./bin": stat ./bin: no such file or directory: unknown
- Handling both JSON and form values in POST request body with unknown values in Golang
- invalid transaction: Transaction failed to sanitize accounts offsets correctly
- Golang lambda upload image into s3 static website
- Is there a way to get a list of selected module versions, but only for modules within the pruned graph?
- Save Interface in DB golang
- ERROR: column "country" is of type text[] but expression is of type record (SQLSTATE 42804)
- Trying to update the version.go file with the release tag from GitHub actions but its failing
- How can I optimize this transposition table for connect 4 AI?
- const declaration - How to evaluate expressions at compile time?
- How add array of authors for unique user in database in Goland IDE?
- Why is the main goroutine not blocked after write in unbuffered channel?
- Insert & Retrieve from a channel in same main function throws "goroutine 1 [chan receive]: main.main() /path exit status 2" error
- Gob error when decoding array of structs: decoding into local type but received remote type
Related Questions in DOCKER
- sqlplus myusername/mypassword@ORCL not working with Oracle on Docker
- Golang == Error: OCI runtime create failed: unable to start container process: exec: "./bin": stat ./bin: no such file or directory: unknown
- Only the first SQL script gets executed inside Docker Postgres container
- Retrieve the Dockerfile configuration from the Kubernetes and also change container Java parameter?
- Polars with Rust: Out of Memory Error when Processing Large Dataset in Docker Using Streaming
- Compiling eBPF program in Docker fails due to missing '__u64' type
- AttributeError: module 'numba' has no attribute 'generated_jit'
- Phoenix in a docker dev environment - generated code can't be saved from VSCode
- Docker on Multipass VMs: Connecting worker nodes to swarm results in rcp error
- Facing error in creating image of my react+vite project . Dockerfile error
- NextJS Docker build fails: fetch failed ECONNREFUSED
- Docker container unable to make HTTPS requests to external API
- Failed to connect to your instance after deploying mern app on aws ec2 instance when i try to access frontend
- Connecting to Postgres running in a Docker container using psql
- Can't connect to local postgresql server from my docker container
Related Questions in OSX-YOSEMITE
- macOS 12.2.X (Monterey) as a developer account -- how can I "csrutil disable" all my APFS partitions?
- VS Code Stop Support for Yosemite Mac OS 10.10 as Electron fails
- Command not found after installing php
- What is the minimum version of macos Apple support?
- How do I copy to clipboard in Safari 8 on Yosemite OS X?
- existing bash script for deleting old backup files - how does it work?
- How to get FavIcon of the current tab in macos(OSX) Swift
- Error installing postgresql with homebrew
- Cannot install anything with brew, Error: Failed to download resource "git--html"
- Rails 5.1.7 Server Hangs On First Request
- Mac command batch not finding file
- Swift writing log file in yosemite
- How to debug webrtc osx project use xcode
- 'Emulator can not be opened because of a problem' AVD not working in Android Studio on Mac Yosemite
- Trying to install git-osx for the first time, download does nothing
Related Questions in REVEL
- How do I generate a model scaffold in golang-revel?
- How to handling multiple files upload golang revel
- How to run multiple migrations on multiple databases in golang-revel
- How to get dynamic app conf in golang revel
- How to reverse for loop in golang-revel
- How to change dynamic variable in Revel Template
- Is it possible to access value in a list in Revel Template
- Go mod tidy find module but it's not getting to go.sum
- How to encode utf-8 request body to windows 1251 in go
- Trying to start an app after build, but getting "router initialize error". How to fix it?
- Running my revel application on windows 10 fail
- Passing a URL as URL param
- App couldn't connect to Postgresql Database with docker-compose
- Cloud Run and Revel Container
- how do I start creating a web service?webix+js+revel
Related Questions in FIG
- FIG how to install the FIG program
- Edit Map in px.scatter_geo Plot (add GA county lines)
- Plugin 'Fig' (version 2.0.0) was explicitly marked as incompatible with the current version of the IDE
- Killed commands on terminal startup
- Extract values from a fig file?
- how to remove previous matplotlib scatter with mouse clicking
- How to remove the "autocomlete" option from the top of the suggestions list?
- phyton - Return Fig out of a function
- matplotlib: Second empty window on plt.show()
- Open saved matlab .fig as specific figure number
- multiple matplotlib plot legend entries
- Showing two figures using matplotlib problem
- R Markdown fig.cap repeats citation
- Installing fig2pdf on macOS
- Plot multiple lines froma list of coordinates in one figure
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)
Popular # Hahtags
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?
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?