-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
344b088
commit 84584d4
Showing
7 changed files
with
80 additions
and
37 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,22 @@ | ||
.gradle | ||
build/ | ||
!gradle/wrapper/gradle-wrapper.jar | ||
!**/src/main/**/build/ | ||
!**/src/test/**/build/ | ||
|
||
### IntelliJ IDEA ### | ||
/.idea | ||
*.iws | ||
*.iml | ||
*.ipr | ||
out/ | ||
!**/src/main/**/out/ | ||
!**/src/test/**/out/ | ||
|
||
### VS Code ### | ||
.vscode/ | ||
|
||
### ENV ### | ||
src/main/resources/.env | ||
.env | ||
creds/ |
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 |
---|---|---|
|
@@ -19,4 +19,5 @@ out/ | |
### ENV ### | ||
src/main/resources/.env | ||
.env | ||
automod.json | ||
creds/gcloud.json | ||
creds/discord |
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,9 +1,8 @@ | ||
FROM gradle:jdk17 AS build | ||
FROM gradle:jdk17 | ||
|
||
WORKDIR /app | ||
COPY --chown=gradle:gradle . . | ||
|
||
RUN gradle build | ||
ENV GOOGLE_APPLICATION_CREDENTIALS=/app/automod.json | ||
|
||
CMD ["gradle", "run"] |
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,15 @@ | ||
# automod | ||
|
||
## Build with | ||
### Build the image | ||
|
||
``` | ||
docker build . --tag automod:latest | ||
docker compose build | ||
``` | ||
|
||
## Run with | ||
### Run the image | ||
|
||
``` | ||
docker run --rm --name automod automod:latest | ||
docker compose -p automod up -d | ||
``` | ||
|
||
Make sure you put `gcloud.json` service account and `discord` bot token in creds folder before running! |
Empty file.
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,13 @@ | ||
version: "3.8" | ||
services: | ||
bot: | ||
build: . | ||
restart: unless-stopped | ||
|
||
environment: | ||
DISCORD_TOKEN: /app/creds/discord | ||
SERVICE_ACCOUNT: /app/creds/gcloud.json | ||
PING_INTERVAL: 10 | ||
ITERATION_COUNT: 10 | ||
volumes: | ||
- ./creds:/app/creds |
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