# tiiko-web dockerfile
# centos, nginx, nodejs
# @author Shaojiang Cai [email protected]
# @date 18/04/2017
FROM joycoding/centos-nginx-nodejs
# Create app directory
RUN mkdir -p /usr/src/tiiko-web
WORKDIR /usr/src/tiiko-web
# Install app dependencies
COPY package.json /usr/src/tiiko-web/
RUN npm install
# Bundle app source
COPY . /usr/src/tiiko-web
# RUN npm run build:prod
# Softlink the nginx configuration file
RUN ln -s /usr/src/tiiko-web/config/Docker.nginx.conf /etc/nginx/conf.d/tiiko-web.conf
RUN ln -s /usr/src/tiiko-web/config/nginx.gzip.conf /etc/nginx/conf.d/gzip.conf
EXPOSE 8008
# Run this script when starting a new docker container
CMD ["sh", "_scripts/deploy.sh"]
deploy.sh#!/usr/bin/env bash
# This script will run when starting a Docker container for deployment
# npm run build:prod
# Start nginx
nginx -g "daemon off;"
Content type
Image
Digest
Size
387 MB
Last updated
over 9 years ago
docker pull joycoding/tiiko-web