archive
This commit is contained in:
17
cypht4/Dockerfile
Normal file
17
cypht4/Dockerfile
Normal file
@@ -0,0 +1,17 @@
|
||||
FROM php:5-apache
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
unzip wget openssl curl
|
||||
|
||||
COPY install.sh /install.sh
|
||||
RUN bash /install.sh
|
||||
|
||||
RUN mkdir /var/lib/hm3
|
||||
RUN mkdir /var/lib/hm3/attachments
|
||||
RUN mkdir /var/lib/hm3/users
|
||||
RUN mkdir /var/lib/hm3/app_data
|
||||
RUN chown -R www-data /var/lib/hm3/
|
||||
|
||||
WORKDIR /var/lib/hm3
|
||||
|
||||
CMD ["php", "-S", "0.0.0.0:33144"]
|
||||
41
cypht4/install.sh
Normal file
41
cypht4/install.sh
Normal file
@@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
# https://cypht.org/install.html
|
||||
|
||||
# this is where Cypht will be installed
|
||||
DESTINATION="/usr/local/share/cypht"
|
||||
|
||||
# validate the destination directory
|
||||
test -r $DESTINATION -a -x $DESTINATION
|
||||
if [ $? -ne 0 ]; then
|
||||
mkdir $DESTINATION
|
||||
fi
|
||||
|
||||
# create working directory
|
||||
mkdir cypht-temp
|
||||
cd cypht-temp
|
||||
|
||||
# grab latest code
|
||||
wget https://github.com/jasonmunro/cypht/archive/master.zip
|
||||
|
||||
# unpack the archive
|
||||
unzip master.zip
|
||||
|
||||
# run composer
|
||||
cd cypht-master && composer install && cd ..
|
||||
|
||||
# create a vanilla ini file
|
||||
cp cypht-master/hm3.sample.ini cypht-master/hm3.ini
|
||||
|
||||
# fix permissions and ownership
|
||||
find cypht-master -type d -print | xargs chmod 755
|
||||
find cypht-master -type f -print | xargs chmod 644
|
||||
chown -R root:root cypht-master
|
||||
|
||||
# copy to destination folder
|
||||
mv cypht-master/* $DESTINATION
|
||||
|
||||
# remove working directory
|
||||
cd ..
|
||||
rm -rf cypht-temp
|
||||
|
||||
Reference in New Issue
Block a user