forked from nyaruka/rp-indexer
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Ilhasoft/test/new_environment
Added docker to develope branch
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM golang:1.12.9-alpine3.9 | ||
|
||
WORKDIR /app | ||
|
||
RUN apk update \ | ||
&& apk add --virtual build-deps gcc git \ | ||
&& rm -rf /var/cache/apk/* | ||
|
||
RUN addgroup -S golang \ | ||
&& adduser -S -G golang golang | ||
|
||
COPY . . | ||
|
||
RUN go install -v ./cmd/... | ||
RUN chown -R golang /app | ||
|
||
USER golang | ||
|
||
EXPOSE 8080 | ||
ENTRYPOINT ["rp-indexer"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: "3" | ||
|
||
services: | ||
indexer: | ||
image: ${DOCKER_IMAGE_NAME:-ilhasoft/indexer}:${DOCKER_IMAGE_TAG:-latest} | ||
build: | ||
context: .. | ||
dockerfile: ./docker/Dockerfile | ||
ports: | ||
- 8080:8000 |