Add docker

This commit is contained in:
Andros Fenollosa 2024-05-26 15:36:02 +02:00
parent 7241455afd
commit b9e58d77fd
5 changed files with 32 additions and 6 deletions

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM clojure:temurin-8-lein-bookworm-slim
# set work directory
WORKDIR /usr/src/app
# set time
RUN ln -fs /usr/share/zoneinfo/Europe/Madrid /etc/localtime
RUN dpkg-reconfigure -f noninteractive tzdata
# Install make
RUN apt update -y
RUN apt install -y make
Entrypoint ["make", "run"]

View File

@ -1,5 +1,9 @@
.DEFAULT_GOAL := build
run:
lein run
while :; do echo 'Hit CTRL+C'; sleep 1; done
build:
make check
lein codox

13
compose.yaml Normal file
View File

@ -0,0 +1,13 @@
services:
importart-stories-alert-for-hacker-news:
restart: always
build:
context: .
dockerfile: Dockerfile
image: clojure:temurin-8-lein-bookworm-slim
volumes:
- ./Makefile:/usr/src/app/Makefile
- ./isahn_history.json:/usr/src/app/isahn_history.json
- ./config.edn:/usr/src/app/config.edn
- ./src/:/usr/src/app/src/
- ./project.clj:/usr/src/app/project.clj

View File

@ -1,6 +0,0 @@
{
:min_score 600
:chat "@important_stories_alert_hacknews"
:bot_token "bot918542948:AAGNfvZ3yqGkainRc-OFB44AYF7yYjY2TuM"
:run_every_miliseconds 3600000
}

1
isahn_history.json Normal file

File diff suppressed because one or more lines are too long