diff --git a/Dockerfile b/Dockerfile index 2687684a..21578a44 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,14 @@ # Install development environment FROM blitzprog/aero -RUN git clone --progress --verbose --depth=1 https://github.com/animenotifier/database ~/.aero/db/arn -# Expect ~/notify.moe to be mounted as a volume -RUN cd ~/notify.moe && \ - tsc && \ - pack && \ - go build \ No newline at end of file +# Download database +RUN git clone --progress --depth=1 https://github.com/animenotifier/database ~/.aero/db/arn + +# Download notify.moe dependencies +RUN curl -s -o go.mod https://raw.githubusercontent.com/animenotifier/notify.moe/go/go.mod && \ + curl -s -o go.sum https://raw.githubusercontent.com/animenotifier/notify.moe/go/go.sum && \ + go mod download && \ + rm go.* + +# Create empty working directory +WORKDIR /home/developer/notify.moe \ No newline at end of file diff --git a/README.md b/README.md index 9fd8f2a0..4bf57b0d 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ docker-compose run notify.moe ## Run the server +* Compile TypeScript files using: `tsc` * Start the web server in notify.moe directory using: `run` * In your browser, import the file `security/default/root.crt` as a trusted Root authority * Open `https://beta.notify.moe` diff --git a/docker-compose.yml b/docker-compose.yml index e02f7e34..294442cc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,5 +5,8 @@ services: image: animenotifier/notify.moe stdin_open: true tty: true + network_mode: bridge ports: - - "443:4001" \ No newline at end of file + - "443:4001" + volumes: + - .:/home/developer/notify.moe \ No newline at end of file diff --git a/makefile b/makefile index a9e93b8a..2fb2714c 100644 --- a/makefile +++ b/makefile @@ -73,6 +73,8 @@ assets: @pack clean: find . -type f | xargs file | grep "ELF.*executable" | awk -F: '{print $1}' | xargs rm + rm -rf ./components + find . -type f | grep /scripts/ | grep .js | xargs rm ports: ifeq ($(OSNAME),LINUX) $(IPTABLES) -t nat -A OUTPUT -o lo -p tcp --dport 80 -j REDIRECT --to-port 4000