forked from bird-house/pyramid-phoenix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (35 loc) · 1.22 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
41
42
43
44
45
46
47
48
49
50
# vim:set ft=dockerfile:
FROM birdhouse/bird-base:latest
MAINTAINER https://github.com/bird-house/pyramid-phoenix
LABEL Description="Phoenix WPS Application" Vendor="Birdhouse" Version="0.6.0"
# Configure hostname and user for services
ENV HOSTNAME localhost
ENV USER www-data
# Set current home
ENV HOME /root
# Copy application sources
COPY . /opt/birdhouse
# cd into application
WORKDIR /opt/birdhouse
# Overwrite buildout.cfg in source folder
COPY profiles/docker.cfg buildout.cfg
# Provide custom.cfg with settings for docker image
COPY .docker.cfg custom.cfg
# Install system dependencies
RUN bash bootstrap.sh -i && bash requirements.sh
# Set conda enviroment
ENV ANACONDA_HOME /opt/conda
ENV CONDA_ENVS_DIR /opt/conda/envs
# Run install
RUN make clean install
# Volume for data, cache, logfiles, ...
RUN chown -R $USER $CONDA_ENVS_DIR/birdhouse
RUN mkdir -p $CONDA_ENVS_DIR/birdhouse/var/lib && mv $CONDA_ENVS_DIR/birdhouse/var/lib /data && ln -s /data $CONDA_ENVS_DIR/birdhouse/var/lib
RUN chown -R $USER /data
VOLUME /data
# Ports used in birdhouse
EXPOSE 9001 8081 8443
# Start supervisor in foreground
ENV DAEMON_OPTS --nodaemon --user $USER
# Start service ...
CMD ["make", "update-config", "update-user", "start"]