changes to postinstall.sh (#308)

* remove contrib/packager.io dir / move cleanup.sh back top contrib / moved postinstall.sh to contrib/pkgr-postinstall.sh / fixed path in .pkgr.yml

* added localhost to nginx.conf servername to get a running version for local testers

* added message with browserlink of zamad to postinstall.sh

* reoved zammad.example.com fromk nginx config
This commit is contained in:
André Bauer 2016-10-26 11:04:36 +02:00 committed by GitHub
parent 5ffb3cd66d
commit 099a951dfd
4 changed files with 15 additions and 5 deletions

View file

@ -25,11 +25,11 @@ before:
- cp config/database.yml.pkgr config/database.yml
- echo "gem 'mysql2'" >> Gemfile.local
- "cat Gemfile.lock"
- contrib/packager.io/cleanup.sh
- contribcleanup.sh
env:
- RAILS_ENV=production
- PORT=3000
- RAILS_SERVE_STATIC_FILES=true
services:
- postgres
after_install: contrib/packager.io/postinstall.sh
after_install: contrib/pkgr-postinstall.sh

View file

@ -14,7 +14,7 @@ upstream zammad-websocket {
server {
listen 80;
server_name zammad.example.com;
server_name localhost;
root /opt/zammad/public;
access_log /var/log/nginx/zammad.access.log;

View file

@ -57,8 +57,18 @@ systemctl start zammad
if [ -d /etc/nginx/sites-enabled ]; then
# copy nginx config
test -f /etc/nginx/sites-available/zammad.conf || cp ${ZAMMAD_DIR}/contrib/nginx/sites-available/zammad.conf /etc/nginx/sites-available/zammad.conf
# creating symlink
test -f /etc/nginx/sites-available/zammad.conf || ln -s /etc/nginx/sites-available/zammad.conf /etc/nginx/sites-enabled/zammad.conf
if [ ! -f /etc/nginx/sites-available/zammad.conf ]
# creating symlink
ln -s /etc/nginx/sites-available/zammad.conf /etc/nginx/sites-enabled/zammad.conf
# show message
echo -e "\nOpen http://localhost in your browser to start or add your FQDN to servername directive in /etc/nginx/sites/enabled/zammad.conf if you're not testing localy!\n"
fi
# restart nginx
systemctl restart nginx
else
# show message
echo -e "\nOpen http://localhost:3000 in your browser to start!\n"
fi