Fixing up docker a little bit. #19.
This commit is contained in:
parent
c3b8a98b77
commit
6e45419e67
14
Dockerfile
14
Dockerfile
|
@ -1,13 +1,13 @@
|
|||
FROM node:10-jessie as node
|
||||
#If encounter Invalid cross-device error -run on host 'echo N | sudo tee /sys/module/overlay/parameters/metacopy'
|
||||
ARG TORRENTS_CSV_ENDPOINT
|
||||
|
||||
ENV TORRENTS_CSV_ENDPOINT=http://0.0.0.0:8080
|
||||
COPY server/ui /app/server/ui
|
||||
RUN cd /app/server/ui && yarn && yarn build
|
||||
|
||||
FROM rust:1.30 as rust
|
||||
COPY server/service /app/server/service
|
||||
RUN cd /app/server/service && cargo build --release && cp ./target/release/torrents-csv-service .
|
||||
RUN cd /app/server/service && cargo build --release
|
||||
|
||||
FROM debian:jessie-slim as volume
|
||||
|
||||
|
@ -25,15 +25,7 @@ RUN cd /app/scripts && . ./build_sqlite.sh
|
|||
|
||||
EXPOSE 8080
|
||||
WORKDIR /app/
|
||||
|
||||
ENV TORRENTS_CSV_DB_FILE=/app/torrents.db
|
||||
ENV TORRENTS_CSV_FRONT_END_DIR=/app/dist
|
||||
|
||||
ARG TORRENTS_CSV_DB_FILE
|
||||
RUN sqlite3 ${TORRENTS_CSV_DB_FILE} 'select * from torrents limit 10'
|
||||
|
||||
CMD /app/torrents-csv-service
|
||||
|
||||
# Running this:
|
||||
|
||||
# docker build .
|
||||
# docker run -p 8080:8080 image_name
|
|
@ -1,8 +1,14 @@
|
|||
version: '2'
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
torrents-csv:
|
||||
build: .
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
TORRENTS_CSV_ENDPOINT: http://0.0.0.0:8080
|
||||
command: /bin/sh -c /app/torrents-csv-service
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- "8080:8080"
|
||||
environment:
|
||||
TORRENTS_CSV_DB_FILE: /app/torrents.db
|
||||
TORRENTS_CSV_FRONT_END_DIR: /app/dist
|
Loading…
Reference in New Issue