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
|
- cp ../database.sql ./OpenMediaCenter/tmp/openmediacenter.sql
|
||||||
- chmod -R 0775 *
|
- chmod -R 0775 *
|
||||||
- dpkg-deb --build OpenMediaCenter
|
- dpkg-deb --build OpenMediaCenter
|
||||||
- mv OpenMediaCenter.deb OpenMediaCenter-0.1_amd64.deb
|
- mv OpenMediaCenter-0.1.deb OpenMediaCenter-0.1_amd64.deb
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- deb/OpenMediaCenter-0.1_amd64.deb
|
- deb/OpenMediaCenter-0.1_amd64.deb
|
||||||
@ -76,7 +76,7 @@ deploy_test1:
|
|||||||
image: luki42/alpineopenssh:latest
|
image: luki42/alpineopenssh:latest
|
||||||
needs:
|
needs:
|
||||||
- test
|
- test
|
||||||
- build
|
- package_debian
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
script:
|
script:
|
||||||
@ -84,6 +84,6 @@ deploy_test1:
|
|||||||
- ssh-add <(echo "$SSH_PRIVATE_KEY")
|
- ssh-add <(echo "$SSH_PRIVATE_KEY")
|
||||||
- mkdir -p ~/.ssh
|
- mkdir -p ~/.ssh
|
||||||
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
||||||
- scp -r build/* root@192.168.0.42:/var/www/html/
|
- scp deb/OpenMediaCenter-*.deb root@192.168.0.42:/tmp/
|
||||||
- scp -r api/ root@192.168.0.42:/var/www/html/
|
- ssh root@192.168.0.42 "apt-get --reinstall install /tmp/OpenMediaCenter-*.deb"
|
||||||
|
|
||||||
|
@ -1,11 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# enable nginx site
|
# enable nginx site
|
||||||
rm /etc/nginx/sites-enabled/OpenMediaCenter.conf
|
ln -sf /etc/nginx/sites-available/OpenMediaCenter.conf /etc/nginx/sites-enabled/OpenMediaCenter.conf
|
||||||
ln -s /etc/nginx/sites-available/OpenMediaCenter.conf /etc/nginx/sites-enabled/OpenMediaCenter.conf
|
|
||||||
|
|
||||||
# link general socket to current one
|
# link general socket to current one
|
||||||
rm /var/run/php-fpm.sock
|
phpsymlink="/var/run/php-fpm.sock";
|
||||||
ln -s /var/run/php/php*-fpm.sock /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
|
# setup database
|
||||||
mysql -uroot -pPASS -e "CREATE DATABASE IF NOT EXISTS mediacenter;"
|
mysql -uroot -pPASS -e "CREATE DATABASE IF NOT EXISTS mediacenter;"
|
||||||
|
@ -5,7 +5,7 @@ server {
|
|||||||
location ~ \.php$ {
|
location ~ \.php$ {
|
||||||
include snippets/fastcgi-php.conf;
|
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;
|
root /var/www/openmediacenter;
|
||||||
|
Loading…
Reference in New Issue
Block a user