2019-12-08 05:10:21 +00:00
|
|
|
FROM phusion/baseimage:0.11
|
|
|
|
|
|
|
|
# Use baseimage-docker's init system.
|
|
|
|
CMD ["/sbin/my_init"]
|
|
|
|
|
2019-12-09 13:11:52 +00:00
|
|
|
# make some SSH keys that will never get used just so that
|
|
|
|
# the container doesn't generate new ones each and every boot
|
|
|
|
# (sshd is not enabled in the container)
|
|
|
|
RUN /etc/my_init.d/00_regen_ssh_host_keys.sh
|
|
|
|
|
2019-12-08 06:50:36 +00:00
|
|
|
ENV \
|
|
|
|
RUN_DB_MIGRATIONS=true \
|
|
|
|
SIDEKIQ_WORKERS=5 \
|
|
|
|
RAILS_SERVE_STATIC_FILES=true \
|
|
|
|
RAILS_ENV=production \
|
|
|
|
NODE_ENV=production \
|
|
|
|
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/mastodon/app/bin
|
|
|
|
|
2019-12-09 09:15:23 +00:00
|
|
|
ARG UID=991
|
|
|
|
ARG GID=991
|
|
|
|
|
|
|
|
ARG REPO_URL=https://github.com/tootsuite/mastodon.git
|
2019-12-11 04:09:52 +00:00
|
|
|
# v3.0.1 upstream
|
|
|
|
ARG REPO_REV=c4118ba71ba31e408c02d289e111326ccc6f6aa2
|
2019-12-08 06:50:36 +00:00
|
|
|
|
2019-12-08 05:46:17 +00:00
|
|
|
# install os prereq stuff to image
|
|
|
|
ADD prereqs.sh /tmp/prereqs.sh
|
|
|
|
RUN bash /tmp/prereqs.sh
|
2019-12-08 05:10:21 +00:00
|
|
|
|
2019-12-08 05:46:17 +00:00
|
|
|
# install mastodon:
|
|
|
|
ADD install.sh /tmp/install.sh
|
|
|
|
|
2019-12-08 06:50:36 +00:00
|
|
|
WORKDIR /mastodon
|
2019-12-09 20:47:10 +00:00
|
|
|
|
2019-12-08 06:50:36 +00:00
|
|
|
ENV HOME /mastodon
|
2019-12-09 20:47:10 +00:00
|
|
|
|
|
|
|
ENV BIND 0.0.0.0
|
|
|
|
|
2019-12-08 05:46:17 +00:00
|
|
|
RUN chpst -u mastodon:mastodon bash /tmp/install.sh
|
2019-12-08 05:10:21 +00:00
|
|
|
|
|
|
|
ADD ./rootfs /
|
|
|
|
|
2019-12-09 09:15:23 +00:00
|
|
|
RUN chmod +x /etc/service/postfix/run
|
|
|
|
RUN chmod +x /etc/service/redis/run
|
|
|
|
RUN chmod +x /etc/service/postgres/run
|
|
|
|
RUN chmod +x /etc/service/startup/run
|
|
|
|
RUN chmod +x /etc/service/sidekiq/run
|
|
|
|
RUN chmod +x /etc/service/web/run
|
|
|
|
RUN chmod +x /etc/service/streaming/run
|
2019-12-08 05:10:21 +00:00
|
|
|
|
|
|
|
VOLUME /state
|
|
|
|
|
|
|
|
EXPOSE 3000 4000
|
2019-12-08 06:50:36 +00:00
|
|
|
|
|
|
|
LABEL maintainer="Jeffrey Paul <sneak@sneak.berlin>" \
|
|
|
|
description="Your self-hosted, globally interconnected microblogging community"
|