Just like ruby on rails, liveload changes.

# Dockerfile
FROM golang:1.9.1
# Install dep
RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
WORKDIR /go/src/APP
ADD Gopkg.toml Gopkg.toml
ADD Gopkg.lock Gopkg.lock
RUN dep ensure -vendor-only
# Install gin
RUN go get github.com/codegangsta/gin
COPY ./src ./src
WORKDIR /go/src/APP/src
# App listen on 8888, gin proxy listen on 3000
EXPOSE 3000
CMD ["gin","-i","-a","8888","run"]
# docker-compose-dev.yml
version: '2.1'
services:
  app:
    build: .
    command: gin -i -a 8888 run
    ports:
      - "127.0.0.0.1:9999:3000"
    depends_on:
      postgres:
        condition: service_healthy
    links:
      - postgres
    volumes:
      - ./src:/go/src/APP/src
    environment:
      - APP_ENV=development
      - APP_DATABASE=app_development
  postgres:
    image: postgres:9.6
    volumes:
      - ./init.sql:/docker-entrypoint-initdb.d/init.sql
    # Make sure Postgres start before app request connection.
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 30s
      timeout: 30s
      retries: 3
# Start Service
$ docker-compose -f docker-compose-dev.yml up