forked from reactioncommerce/reaction
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreaction.prod.docker
More file actions
53 lines (40 loc) · 1.34 KB
/
Copy pathreaction.prod.docker
File metadata and controls
53 lines (40 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM debian:jessie
MAINTAINER Reaction Commerce <hello@reactioncommerce.com>
ENV NODE_VERSION "4.4.3"
# Install PhantomJS
ENV INSTALL_PHANTOMJS "true"
ENV PHANTOMJS_VERSION "2.1.3"
# Install MongoDB
ENV INSTALL_MONGO "false"
ENV MONGO_MAJOR "2.6"
ENV MONGO_VERSION "2.6.11"
# Meteor environment variables
ENV PORT "80"
ENV ROOT_URL "http://localhost"
ENV MONGO_URL "mongodb://192.168.10.16:27017/meteor"
ENV PACKAGE_DIRS "packages"
# build script directories
ENV APP_SOURCE_DIR "/var/src"
ENV APP_BUNDLE_DIR "/var/www"
ENV BUILD_SCRIPTS_DIR "/opt/reaction"
# Install entrypoint and build scripts
COPY docker/scripts $BUILD_SCRIPTS_DIR
RUN chmod -R +x $BUILD_SCRIPTS_DIR
# copy the app to the container
COPY . $APP_SOURCE_DIR
# install base dependencies, build app, cleanup
RUN bash $BUILD_SCRIPTS_DIR/install-deps.sh && \
#bash $BUILD_SCRIPTS_DIR/install-mongodb.sh && \
bash $BUILD_SCRIPTS_DIR/install-node.sh && \
bash $BUILD_SCRIPTS_DIR/install-phantom.sh && \
bash $BUILD_SCRIPTS_DIR/install-meteor.sh && \
cd $APP_SOURCE_DIR && \
bash $BUILD_SCRIPTS_DIR/build-meteor.sh && \
bash $BUILD_SCRIPTS_DIR/post-build-cleanup.sh
# switch to production meteor bundle
WORKDIR $APP_BUNDLE_DIR/bundle
# 80 is the default meteor production port, while 3000 is development mode
EXPOSE 80
# start mongo and reaction
ENTRYPOINT ["./entrypoint.sh"]
CMD []