improve creation of symlink for php socket and install dep package for example container
This commit is contained in:
parent
8f7ba53c39
commit
5eed1849bc
@ -65,7 +65,7 @@ package_debian:
|
||||
- cp ../database.sql ./OpenMediaCenter/tmp/openmediacenter.sql
|
||||
- chmod -R 0775 *
|
||||
- dpkg-deb --build OpenMediaCenter
|
||||
- mv OpenMediaCenter.deb OpenMediaCenter-0.1_amd64.deb
|
||||
- mv OpenMediaCenter-0.1.deb OpenMediaCenter-0.1_amd64.deb
|
||||
artifacts:
|
||||
paths:
|
||||
- deb/OpenMediaCenter-0.1_amd64.deb
|
||||
@ -76,7 +76,7 @@ deploy_test1:
|
||||
image: luki42/alpineopenssh:latest
|
||||
needs:
|
||||
- test
|
||||
- build
|
||||
- package_debian
|
||||
only:
|
||||
- master
|
||||
script:
|
||||
@ -84,6 +84,6 @@ deploy_test1:
|
||||
- ssh-add <(echo "$SSH_PRIVATE_KEY")
|
||||
- mkdir -p ~/.ssh
|
||||
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
||||
- scp -r build/* root@192.168.0.42:/var/www/html/
|
||||
- scp -r api/ root@192.168.0.42:/var/www/html/
|
||||
- scp deb/OpenMediaCenter-*.deb root@192.168.0.42:/tmp/
|
||||
- ssh root@192.168.0.42 "apt-get --reinstall install /tmp/OpenMediaCenter-*.deb"
|
||||
|
||||
|
@ -1,11 +1,20 @@
|
||||
#!/bin/bash
|
||||
# enable nginx site
|
||||
rm /etc/nginx/sites-enabled/OpenMediaCenter.conf
|
||||
ln -s /etc/nginx/sites-available/OpenMediaCenter.conf /etc/nginx/sites-enabled/OpenMediaCenter.conf
|
||||
ln -sf /etc/nginx/sites-available/OpenMediaCenter.conf /etc/nginx/sites-enabled/OpenMediaCenter.conf
|
||||
|
||||
# link general socket to current one
|
||||
rm /var/run/php-fpm.sock
|
||||
ln -s /var/run/php/php*-fpm.sock /var/run/php-fpm.sock
|
||||
phpsymlink="/var/run/php-fpm.sock";
|
||||
|
||||
# create a gneral symlink to the php socket if not already existing
|
||||
if [ -L ${phpsymlink} ] ; then
|
||||
if [ -e ${phpsymlink} ] ; then
|
||||
echo "general php symlink already exists."
|
||||
else
|
||||
ln -sf /var/run/php/php*.*-fpm.sock /var/run/php/php-fpm.sock
|
||||
fi
|
||||
else
|
||||
ln -sf /var/run/php/php*.*-fpm.sock /var/run/php/php-fpm.sock
|
||||
fi
|
||||
|
||||
# setup database
|
||||
mysql -uroot -pPASS -e "CREATE DATABASE IF NOT EXISTS mediacenter;"
|
||||
|
@ -5,7 +5,7 @@ server {
|
||||
location ~ \.php$ {
|
||||
include snippets/fastcgi-php.conf;
|
||||
|
||||
fastcgi_pass unix:/var/run/php-fpm.sock;
|
||||
fastcgi_pass unix:/var/run/php/php-fpm.sock;
|
||||
}
|
||||
|
||||
root /var/www/openmediacenter;
|
||||
|
Loading…
Reference in New Issue
Block a user