forked from tozd/docker-meteor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (34 loc) · 1.32 KB
/
Dockerfile
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
FROM tozd/runit
EXPOSE 3000/tcp
ENV ROOT_URL http://example.com
ENV MAIL_URL smtp://user:password@mailhost:port/
ENV METEOR_SETTINGS {}
ENV PORT 3000
ENV MONGO_URL mongodb://mongodb/meteor
ENV MONGO_OPLOG_URL mongodb://mongodb/local
ENV HOME /
VOLUME /var/log/meteor
COPY ./etc /etc
RUN apt-get update -q -q && \
apt-get --yes --force-yes install curl python build-essential && \
export METEOR_ALLOW_SUPERUSER=true && \
curl https://install.meteor.com/ | sed s/--progress-bar/-sL/g | sh && \
apt-get --yes --force-yes purge curl && \
apt-get --yes --force-yes autoremove && \
adduser --system --group meteor --home / && \
export "NODE=$(find /.meteor/ -path '*bin/node' | grep '/.meteor/packages/meteor-tool/' | sort | head -n 1)" && \
ln -sf ${NODE} /usr/local/bin/node && \
echo "export NODE_PATH=\"$(dirname $(dirname "$NODE"))/lib/node_modules\"" >> /etc/service/meteor/run.env
ONBUILD COPY . /source
ONBUILD RUN export METEOR_ALLOW_SUPERUSER=true && \
rm -rf /source/.meteor/local /source/node_modules && \
if [ -x /source/docker-source.sh ]; then /source/docker-source.sh; fi && \
cp -a /source /build && \
rm -rf /source && \
cd /build && \
meteor list && \
if [ -f package.json ]; then meteor npm install --production; fi && \
meteor build --headless . && \
cd / && \
tar xf /build/build.tar.gz && \
rm -rf /build