-
Notifications
You must be signed in to change notification settings - Fork 27
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
edae92a
commit 99368fa
Showing
8 changed files
with
130 additions
and
51 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,25 @@ | ||
# Use builder image to build and do initial config | ||
FROM golang:alpine as builder | ||
ENV GOOS=linux GOARCH=amd64 CGO_ENABLED=0 | ||
ADD . /go | ||
RUN rm sweetiebot/override.go | ||
RUN apk add --no-cache git | ||
RUN go get github.com/blackhole12/discordgo | ||
RUN cd src/github.com/blackhole12/discordgo/;git checkout develop | ||
RUN go get github.com/go-sql-driver/mysql | ||
RUN go build -a -installsuffix cgo -o sweetie.out ./sweetie | ||
RUN go build -a -installsuffix cgo -o updater.out ./updater | ||
|
||
FROM alpine:latest | ||
RUN apk add --no-cache ca-certificates | ||
COPY --from=builder /go/sweetie.out /sweetie | ||
COPY --from=builder /go/updater.out /updater | ||
ADD selfhost.json / | ||
ADD sweetiebot.sql / | ||
ADD sweetiebot_tz.sql / | ||
ADD web.css / | ||
ADD web.html / | ||
ADD docker_run.sh / | ||
EXPOSE 80 | ||
EXPOSE 443 | ||
CMD ["./docker_run.sh"] |
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,3 @@ | ||
FROM mariadb:latest | ||
ADD sweetiebot.sql /docker-entrypoint-initdb.d | ||
ADD sweetiebot_tz.sql /docker-entrypoint-initdb.d |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: '3' | ||
services: | ||
web: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
restart: always | ||
ports: | ||
- "80:80" | ||
- "443:443" | ||
mariadb: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.mariadb | ||
expose: | ||
- "3306" | ||
restart: always | ||
environment: | ||
- MYSQL_ROOT_PASSWORD=<YOUR PASSWORD> | ||
|
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,3 @@ | ||
#!/bin/sh | ||
./sweetie | ||
./updater |
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 @@ | ||
{"token": "<YOUR TOKEN>", "dbauth": "root:<YOUR PASSWORD>@tcp(mariadb:3306)/sweetiebot?parseTime=true&collation=utf8mb4_general_ci", "mainguildid": "<YOUR SERVER ID>", "maxconfigsize": 1000000, "maxuniqueitems": 25000} |
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