From 699132583134d921f3cce5dad60ce28bb97335a6 Mon Sep 17 00:00:00 2001 From: Watn3y Date: Sun, 5 Mar 2023 04:38:25 +0100 Subject: [PATCH] Docker --- .dockerignore | 12 ++++++++++++ .idea/.gitignore | 8 ++++++++ .idea/bloaterbot.iml | 9 +++++++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ Dockerfile | 11 ++++------- docker-compose.yaml | 13 +++++++++++++ 7 files changed, 60 insertions(+), 7 deletions(-) create mode 100644 .dockerignore create mode 100644 .idea/.gitignore create mode 100644 .idea/bloaterbot.iml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 docker-compose.yaml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..d3079ae --- /dev/null +++ b/.dockerignore @@ -0,0 +1,12 @@ +README.md + +config.toml +config.toml.example + +Dockerfile + +.idea +.git + +.gitignore +.dockerignore diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/bloaterbot.iml b/.idea/bloaterbot.iml new file mode 100644 index 0000000..5e764c4 --- /dev/null +++ b/.idea/bloaterbot.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..636668e --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 51aa16f..7a3f579 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,14 +12,11 @@ RUN pip3 install yt-dlp #build nenefootbot WORKDIR /app -COPY * ./ - +COPY . . RUN go mod download +RUN mkdir -RUN go build -o /bloaterbot +RUN go build -o bloaterbot -ENV NENEFOOTBOT_APITOKEN $NENEFOOTBOT_APITOKEN -ENV NENEFOOTBOT_DEBUGMODE $NENEFOOTBOT_DEBUGMODE - -CMD [ "/bloaterbot" ] \ No newline at end of file +CMD [ "bloaterbot" ] \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..b5e581a --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,13 @@ +version: '3.5' +services: + nenefootbot: + image: bloaterbot:latest + container_name: bloaterbot + restart: unless-stopped + volumes: + - /opt/bloaterbot/config.toml:/app/config.toml + networks: + - expose +networks: + expose: + external: true \ No newline at end of file