tellform/Dockerfile

78 lines
2 KiB
Docker
Raw Normal View History

2016-08-17 19:04:42 +00:00
# Build:
2017-10-11 05:07:13 +00:00
# docker build -t tellform-prod -f ./Dockerfile-production .
2016-08-17 19:04:42 +00:00
#
# Run:
2017-10-11 05:07:13 +00:00
# docker run -it tellform-prod
FROM node:10-alpine
2019-04-30 02:09:25 +00:00
MAINTAINER Arielle Baldwynn <team@tellform.com>
2015-07-09 22:15:34 +00:00
# Install some needed packages
RUN apk add --no-cache \
git \
&& rm -rf /tmp/*
2016-08-17 19:04:42 +00:00
2017-10-11 05:07:13 +00:00
# Install NPM Global Libraries
RUN npm install --quiet -g grunt bower pm2 && npm cache clean --force
2016-08-17 19:04:42 +00:00
2016-12-01 00:29:44 +00:00
WORKDIR /opt/tellform
2017-10-11 05:07:13 +00:00
RUN mkdir -p /opt/tellform/public/lib
2016-08-17 19:04:42 +00:00
2016-12-01 00:29:44 +00:00
# Add bower.json
COPY bower.json /opt/tellform/bower.json
COPY .bowerrc /opt/tellform/.bowerrc
2016-08-17 19:04:42 +00:00
2017-10-11 05:07:13 +00:00
COPY ./process.yml /opt/tellform/process.yml
2016-12-01 00:29:44 +00:00
COPY ./app /opt/tellform/app
COPY ./public /opt/tellform/public
COPY ./config /opt/tellform/config
COPY ./gruntfile.js /opt/tellform/gruntfile.js
COPY ./server.js /opt/tellform/server.js
2017-04-03 20:28:24 +00:00
COPY ./scripts/create_admin.js /opt/tellform/scripts/create_admin.js
2016-08-17 19:04:42 +00:00
# Set default ENV
ENV NODE_ENV=development
ENV SECRET_KEY=ChangeMeChangeMe
#ENV MONGODB_URI=mongodb://mongo/tellform
#ENV REDIS_URL=redis://redis:6379
ENV PORT=5000
ENV BASE_URL=localhost
ENV SOCKET_PORT=20523
ENV SIGNUP_DISABLED=FALSE
ENV SUBDOMAINS_DISABLED=FALSE
ENV ENABLE_CLUSTER_MODE=FALSE
ENV MAILER_EMAIL_ID=tellform@localhost
ENV MAILER_PASSWORD=
ENV MAILER_FROM=tellform@localhost
ENV MAILER_SERVICE_PROVIDER=
ENV MAILER_SMTP_HOST=
ENV MAILER_SMTP_PORT=
ENV MAILER_SMTP_SECURE=
ENV CREATE_ADMIN=FALSE
2019-07-03 07:47:52 +00:00
ENV ADMIN_EMAIL=admin@tellform.com
ENV ADMIN_USERNAME=root
ENV ADMIN_PASSWORD=root
ENV APP_NAME=Tellform
ENV APP_KEYWORDS=
ENV APP_DESC=
# optional ENV settings
ENV COVERALLS_REPO_TOKEN=
ENV GOOGLE_ANALYTICS_ID=
ENV RAVEN_DSN=
2017-10-11 05:07:13 +00:00
# Copies the local package.json file to the container
# and utilities docker container cache to not needing to rebuild
# and install node_modules/ everytime we build the docker, but only
# when the local package.json file changes.
# Add npm package.json
COPY ./package.json /opt/tellform/package.json
2017-10-19 00:18:18 +00:00
RUN npm install --only=production --quiet
2019-07-03 20:13:28 +00:00
RUN bower install --allow-root
RUN grunt build
2017-09-30 00:33:55 +00:00
2017-10-11 05:07:13 +00:00
# Run TellForm server
2017-10-19 00:18:18 +00:00
CMD ["node", "server.js"]