Updated docker settings

This commit is contained in:
Eduard Urbach 2019-04-14 19:04:08 +09:00
parent c210ab36ee
commit efcd77cb99
4 changed files with 18 additions and 7 deletions

View File

@ -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
# 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

View File

@ -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`

View File

@ -5,5 +5,8 @@ services:
image: animenotifier/notify.moe
stdin_open: true
tty: true
network_mode: bridge
ports:
- "443:4001"
- "443:4001"
volumes:
- .:/home/developer/notify.moe

View File

@ -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