-
Notifications
You must be signed in to change notification settings - Fork 2
/
hmm_dockerfile
44 lines (44 loc) · 1.69 KB
/
hmm_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
#
# Build:
# cd /usr/local/textpresso/git/textpressocentral
# docker build -t hmm_ubuntu-tpc-16.04 -f hmm_dockerfile .
#
FROM hmm_ubuntu-tpc-buildtest-16.04
COPY . /root/textpressocentral/
RUN cd /root/textpressocentral; rm -rf cmake-build-release; \
mkdir cmake-build-release; cd cmake-build-release; \
cmake -DCMAKE_BUILD_TYPE=Release ..; make -j 5; make install; make clean
RUN mkdir -p /data/tpcas; mkdir -p /data/luceneindex; mkdir -p /data/postgres
RUN /usr/local/textpresso/bin/tpctl.sh set_literature_dir /data
RUN /usr/local/textpresso/bin/tpctl.sh activate
RUN cd /root/; mv textpressocentral/run.sh .; rm -rf textpressocentral/
EXPOSE 80
ENTRYPOINT ["/root/run.sh"]
CMD ["default"]
#
# To be done manually:
# - make sure there are no sym. links in tpcas or luceneindex that the container
# cannot reach. Do rsync luceneindex and tpcas directory with --copy-links option
# to a tmp directory if necessary. Make sure all postgres, tpcas and luceneindices
# on the host are owned by root
# - set default literature permissions
#
#
# Run:
# To make life easier, put tpcas, luceneindex, postgres directory in a data
# directory on the host file system. If that's not possible, map the three
# directories separately.
#
# default:
# docker run --name tpc -d --restart=always -p <host port>:80 \
# -v <data directory on host>:/data:ro hmm_ubuntu-tpc-16.04
#
# stopped:
# docker run --name tpc -d -p <host port>:80 \
# -v <data directory on host>:/data:ro hmm_ubuntu-tpc-16.04 stopped
#
# dev:
# docker run --name tpc -d -p <host port>:80 \
# -v <data directory on host>:/data:ro
# -v <textpressocentral directory on host>:/root/textpressocentral hmm_ubuntu-tpc-16.04 dev
#