forked from opf/openproject
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.public
37 lines (29 loc) · 1.21 KB
/
Dockerfile.public
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
FROM openproject/community:edge-base
MAINTAINER [email protected]
ENV DATABASE_URL=postgres://openproject:[email protected]/openproject
ENV RAILS_ENV=production
ENV HEROKU=true
ENV ATTACHMENTS_STORAGE_PATH=/var/db/openproject/files
ENV RAILS_CACHE_STORE=memcache
ENV SECRET_KEY_BASE=OVERWRITE_ME
USER root
RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
memcached \
postfix \
postgresql \
apache2 \
supervisor && \
apt-get clean && rm -rf /var/lib/apt/lists/*
RUN a2enmod proxy proxy_http && rm -f /etc/apache2/sites-enabled/000-default.conf
RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.4/main/pg_hba.conf
RUN echo "listen_addresses='*'" >> /etc/postgresql/9.4/main/postgresql.conf
RUN rm -rf /var/lib/postgresql/9.4/main && mkdir -p /var/lib/postgresql/9.4/main && chown -R postgres:postgres /var/lib/postgresql/9.4
RUN mkdir -p /var/db/openproject/{files,git,svn} && chown -R app:app /var/db/openproject
COPY docker /usr/src/app/docker
COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# ports
EXPOSE 80 5432
# volumes to export
VOLUME ["/var/lib/postgresql/9.4/main", "/var/db/openproject"]
CMD ["/usr/src/app/docker/entrypoint"]