e8395f027b
* First pass at a (swarm-compatible) docker image Uses an existing traefik server as a https reverse proxy. * Add example config for a Docker swarm deployment * Point to traefik config for docker compose setup * Clarify that traefik is needed for the example config * Use node:8-stretch base image and don't install yarn (The base image already contains yarn.) * Initial commit for an Alpine Docker image * Fix docker volume path * Merge #213 and #225 and move files around * Remove unnecessary dependencies from the alpine build * Update Dockerfiles to match install path, config path, etc. * Update the configuration in the example compose file * Update the configuration in the example swarm file * Remove the declared networks and volumes from the compose example, which are not strictly required * Update attachment path in the documentation * Display traefik as a suggestion and not a required dependency * Update the Docker ignored files * Fix typos reported in #225 * Move production Dockerfiles to a production directory * Add the redis configuration settings * Add Docker files to the dockerignore * Make the signup limit configurable
24 lines
599 B
Text
24 lines
599 B
Text
FROM node:8-alpine
|
|
|
|
# Install dependencies
|
|
RUN apk add --no-cache ffmpeg openssl bash make g++ git \
|
|
&& apk add --no-cache --repository https://dl-3.alpinelinux.org/alpine/edge/testing/ vips-dev fftw-dev
|
|
|
|
# Install the application
|
|
WORKDIR /app
|
|
|
|
COPY . ./
|
|
RUN bash -c 'yarn install --pure-lockfile && npm run build'
|
|
|
|
# Configure the application
|
|
RUN addgroup -g 991 peertube \
|
|
&& adduser -D -u 991 -G peertube -h /data peertube
|
|
USER peertube
|
|
|
|
ENV NODE_ENV production
|
|
ENV NODE_CONFIG_DIR /app/support/docker/production/config/
|
|
|
|
# Run the application
|
|
CMD ["npm", "start"]
|
|
VOLUME ["/data"]
|
|
EXPOSE 9000
|