-
-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
59 additions
and
5 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 |
---|---|---|
@@ -1,11 +1,16 @@ | ||
.PHONY: run tidy vendor build | ||
|
||
GO_CMD = go | ||
GORELEASER_CMD = goreleaser | ||
|
||
run: | ||
go run main.go | ||
$(GO_CMD) run main.go | ||
|
||
tidy: | ||
go mod tidy | ||
$(GO_CMD) mod tidy | ||
|
||
vendor: | ||
go mod vendor | ||
$(GO_CMD) mod vendor | ||
|
||
build: | ||
goreleaser release --snapshot --skip=publish --clean --skip=sign | ||
$(GORELEASER_CMD) release --snapshot --skip=publish --clean --skip=sign |
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,27 @@ | ||
# This is to run the alita-robot in debug mode with alpine image | ||
# This starts up fast and does not do any optimizations | ||
services: | ||
alita: | ||
build: | ||
context: . | ||
dockerfile: docker/debug.alpine | ||
container_name: alita-robot | ||
restart: always | ||
env_file: | ||
- .env | ||
depends_on: | ||
- mongodb | ||
- redis | ||
|
||
mongodb: | ||
image: mongo:latest | ||
restart: always | ||
env_file: | ||
- .db.env | ||
volumes: | ||
- ./docker/entrypoint-initdb.d/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro | ||
|
||
redis: | ||
image: redis:latest | ||
restart: always | ||
command: redis-server --requirepass redisPassword |
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
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 |
---|---|---|
|
@@ -11,6 +11,7 @@ FROM alpine | |
COPY --from=builder /app/out/alita_robot /app/alita_robot | ||
ENTRYPOINT ["/app/alita_robot"] | ||
|
||
# Metadata | ||
LABEL org.opencontainers.image.authors="Divanshu Chauhan <[email protected]>" | ||
LABEL org.opencontainers.image.url="https://divkix.me" | ||
LABEL org.opencontainers.image.source="https://github.com/divideprojects/Alita_Robot" | ||
|
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,16 @@ | ||
# Build Stage: Build bot using the alpine image | ||
# This is an debug image, it will not compress the binary | ||
FROM golang:alpine AS builder | ||
RUN apk add --no-cache curl wget gnupg git upx | ||
WORKDIR /app | ||
COPY . . | ||
RUN go build -o out/alita_robot | ||
ENTRYPOINT ["/app/out/alita_robot"] | ||
|
||
# Metadata | ||
LABEL org.opencontainers.image.authors="Divanshu Chauhan <[email protected]>" | ||
LABEL org.opencontainers.image.url="https://divkix.me" | ||
LABEL org.opencontainers.image.source="https://github.com/divideprojects/Alita_Robot" | ||
LABEL org.opencontainers.image.title="Alita Go Robot" | ||
LABEL org.opencontainers.image.description="Official Alita Go Robot Debug Docker Image" | ||
LABEL org.opencontainers.image.vendor="Divkix" |
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
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ FROM alpine | |
COPY alita_robot / | ||
ENTRYPOINT ["/alita_robot"] | ||
|
||
# Metadata | ||
LABEL org.opencontainers.image.authors="Divanshu Chauhan <[email protected]>" | ||
LABEL org.opencontainers.image.url="https://divkix.me" | ||
LABEL org.opencontainers.image.source="https://github.com/divideprojects/Alita_Robot" | ||
|