Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FROM golang
- ARG app_env
- ENV APP_ENV $app_env
- # it is okay to leave user/GoDoRP as long as you do not want to share code with other libraries
- COPY . /go/src/github.com/user/GoDoRP/api
- WORKDIR /go/src/github.com/user/GoDoRP/api
- # added vendor services will need to be included here
- RUN go get ./vendor/database
- RUN go get ./
- RUN go build
- # if dev setting will use pilu/fresh for code reloading via docker-compose volume sharing with local machine
- # if production setting will build binary
- CMD if [ ${APP_ENV} = production ]; \
- then \
- api; \
- else \
- go get github.com/pilu/fresh && \
- fresh; \
- fi
- EXPOSE 8080
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement