3 # FusionForge startpoint script. Entrypoint for docker container
5 # Copyright 2017, Franck Villaume - TrivialDev
7 # This file is part of FusionForge. FusionForge is free software;
8 # you can redistribute it and/or modify it under the terms of the
9 # GNU General Public License as published by the Free Software
10 # Foundation; either version 2 of the Licence, or (at your option)
13 # FusionForge is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License along
19 # with FusionForge; if not, write to the Free Software Foundation, Inc.,
20 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 if [[ ! -d /var/lib/pgsql/backups ]]; then
24 mkdir -p /var/lib/pgsql/backups
25 chown postgres:postgres /var/lib/pgsql/backups
27 if [[ ! -d /var/lib/pgsql/data ]]; then
28 mkdir -p /var/lib/pgsql/data
29 chown postgres:postgres /var/lib/pgsql/data
31 if [[ ! -f /var/lib/pgsql/data/postgresql.conf ]]; then
32 su postgres -c "/usr/bin/initdb -D /var/lib/pgsql/data"
35 su postgres -c "/usr/bin/postgres -D /var/lib/pgsql/data -p 5432 &"
39 cd /opt/sources/fusionforge/src/ && \
45 install-plugin-scmcvs \
46 install-plugin-scmsvn \
47 install-plugin-scmgit \
48 install-plugin-scmhg \
49 install-plugin-blocks \
50 install-plugin-moinmoin \
51 install-plugin-taskboard \
52 install-plugin-message \
53 install-plugin-repositoryapi \
54 install-plugin-mediawiki \
55 install-plugin-compactpreview \
56 install-plugin-headermenu \
57 install-plugin-gravatar \
58 install-plugin-scmhook \
59 install-plugin-webanalytics \
60 install-plugin-phptextcaptcha
63 /usr/local/share/fusionforge/post-install.d/common/common.sh configure
64 /usr/local/share/fusionforge/post-install.d/web/web.sh rawconfigure
65 /usr/local/share/fusionforge/post-install.d/shell/shell.sh rawconfigure
66 /usr/local/share/fusionforge/post-install.d/ftp/ftp.sh configure
70 echo '[core]' > /etc/fusionforge/config.ini.d/zzzz-local.ini
71 echo 'is_docker = 1' >> /etc/fusionforge/config.ini.d/zzzz-local.ini
72 echo "tracker_parser_type = 'markdown'" >> /etc/fusionforge/config.ini.d/zzzz-local.ini
74 if [[ ! -z ${PORT_HTTP} ]]; then
75 echo 'http_port = '${PORT_HTTP} >> /etc/fusionforge/config.ini.d/zzzz-local.ini
77 if [[ ! -z ${PORT_HTTPS} ]]; then
78 echo 'https_port = '${PORT_HTTPS} >> /etc/fusionforge/config.ini.d/zzzz-local.ini
80 if [[ ! -z ${PORT_SSH} ]]; then
81 echo 'ssh_port = '${PORT_SSH} >> /etc/fusionforge/config.ini.d/zzzz-local.ini
84 echo '[blocks]' >> /etc/fusionforge/config.ini.d/zzzz-local.ini
85 echo "parser_type = 'markdown'" >> /etc/fusionforge/config.ini.d/zzzz-local.ini
86 echo "default = 'use markdown syntax to format your text'" >> /etc/fusionforge/config.ini.d/zzzz-local.ini
90 echo "127.0.0.1 scm."`hostname -f` >> /etc/hosts