-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6ff7a63
commit fd1972a
Showing
1 changed file
with
16 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,31 @@ | ||
# Stremio Node 14.x | ||
FROM stremio/node-base:fermium | ||
# the node version for running Stremio Web | ||
ARG NODE_VERSION=15-alpine | ||
FROM node:$NODE_VERSION AS base | ||
|
||
# Meta | ||
LABEL Description="Stremio Web" Vendor="Smart Code OOD" Version="1.0.0" | ||
|
||
# Update GitHub remote host key | ||
RUN echo "github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=" >> ~/.ssh/known_hosts | ||
|
||
# Create app directory | ||
RUN mkdir -p /var/www/stremio-web | ||
WORKDIR /var/www/stremio-web | ||
|
||
# Install app dependencies | ||
FROM base AS prebuild | ||
|
||
RUN apk update && apk upgrade && \ | ||
apk add --no-cache git | ||
WORKDIR /var/www/stremio-web | ||
COPY . /var/www/stremio-web | ||
RUN npm install | ||
COPY . . | ||
RUN npm install | ||
RUN npm run build | ||
|
||
# Bundle app source | ||
WORKDIR /var/www/stremio-web | ||
FROM base AS final | ||
|
||
RUN npm run build | ||
WORKDIR /var/www/stremio-web | ||
COPY . . | ||
COPY --from=prebuild /var/www/stremio-web/node_modules ./node_modules | ||
COPY --from=prebuild /var/www/stremio-web/build ./build | ||
|
||
EXPOSE 8080 | ||
CMD ["node", "http_server.js"] |