about summary refs log tree commit diff
path: root/Dockerfile
diff options
context:
space:
mode:
authorShel R <Yiskah.Raphen@gmail.com>2017-04-07 22:34:45 -0400
committerGitHub <noreply@github.com>2017-04-07 22:34:45 -0400
commitcf03634e74364af3a703ea09073ab0a58448d460 (patch)
treed4454c7feaa75a99532d4a5cd9bfdff8b4c8bf09 /Dockerfile
parent83530f0eef8f6cf04321b61c917da08ab0f4e323 (diff)
parent698d74a15fe8db61de057b8876e9967e9e9c7330 (diff)
Merge branch 'master' into add-elao-com-instance
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile12
1 files changed, 10 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile
index bcc911343..57a8f34e9 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,11 +1,16 @@
 FROM ruby:2.3.1-alpine
 
+LABEL maintainer="https://github.com/tootsuite/mastodon" \
+      description="A GNU Social-compatible microblogging server"
+
 ENV RAILS_ENV=production \
     NODE_ENV=production
 
+EXPOSE 3000 4000
+
 WORKDIR /mastodon
 
-COPY . /mastodon
+COPY Gemfile Gemfile.lock package.json yarn.lock /mastodon/
 
 RUN BUILD_DEPS=" \
     postgresql-dev \
@@ -24,8 +29,11 @@ RUN BUILD_DEPS=" \
  && npm install -g npm@3 && npm install -g yarn \
  && bundle install --deployment --without test development \
  && yarn \
- && npm cache clean \
+ && yarn cache clean \
+ && npm -g cache clean \
  && apk del $BUILD_DEPS \
  && rm -rf /tmp/* /var/cache/apk/*
 
+COPY . /mastodon
+
 VOLUME /mastodon/public/system /mastodon/public/assets