parent
da7a51bedb
commit
72495b4b01
17 changed files with 188 additions and 111 deletions
@ -0,0 +1,12 @@ |
||||
FROM mwaeckerlin/php-fpm |
||||
MAINTAINER mwaeckerlin |
||||
|
||||
ENV CONTAINERNAME safechat |
||||
ENV WEB_ROOT_PATH /usr/share/safechat-php/html/ |
||||
USER root |
||||
RUN apk add mysql-client gpgme gpgme-dev musl-dev gcc make && \ |
||||
pecl install gnupg && \ |
||||
echo extension=gnupg.so >> /etc/php7/php.ini && \ |
||||
apk del gpgme-dev musl-dev gcc make |
||||
ADD usr /usr |
||||
USER $WWWUSER |
@ -0,0 +1,33 @@ |
||||
Docker Image for SafeChat |
||||
========================= |
||||
|
||||
For a running example see: https://safechat.ch |
||||
|
||||
|
||||
Run SafeChat |
||||
------------ |
||||
|
||||
Safechat exposts port 8080 as it is based on [mwaeckerlin/php-fpm]. |
||||
|
||||
You need a [mysql] database (less than version 8). The hostname must be `mysql` and the root password must be set in `MYSQL_ENV_MYSQL_ROOT_PASSWORD`, e.g. |
||||
|
||||
```bash |
||||
docker run -d --name safechat-mysql -e MYSQL_ROOT_PASSWORD=$(pwgen 20 1) mysql:5 |
||||
docker run -d --name safechat -p 8005:8080 --link safechat-mysql:mysql mwaeckerlin/safechat |
||||
``` |
||||
|
||||
|
||||
Build Docker Image |
||||
------------------ |
||||
|
||||
Install safechat into path `docker/usr`, then build the image, e.g.: |
||||
|
||||
```bash |
||||
cd ~/git/safechat |
||||
./bootstrap.sh -t "all install" --prefix=$(pwd)/docker/usr |
||||
docker build --rm --force-rm -t mwaeckerlin/safechat docker |
||||
``` |
||||
|
||||
|
||||
[mwaeckerlin/php-fpm]: https://hub.docker.com/r/mwaeckerlin/php-fpm "image on docker hub" |
||||
[mysql]: https://hub.docker.com/_/mysql "image on docker hub" |
@ -1,9 +1,9 @@ |
||||
[Desktop Entry] |
||||
Type=Application |
||||
Name=safechat |
||||
GenericName=safechat |
||||
Name=safechat-php |
||||
GenericName=safechat-php |
||||
Comment=@DESCRIPTION@ |
||||
Icon=@prefix@/share/@PACKAGE_NAME@/@PACKAGE_ICON@ |
||||
Exec=safechat %u |
||||
Exec=safechat-php %u |
||||
Terminal=false |
||||
Categories=Qt;Utility; |
@ -0,0 +1,61 @@ |
||||
Summary: @DESCRIPTION@ |
||||
Name: @PACKAGE_NAME@ |
||||
Version: @VERSION@ |
||||
Release: @BUILD_NUMBER@.@DISTRO@ |
||||
License: LGPL |
||||
Group: @RPM_GROUP@ |
||||
|
||||
Source0: %{name}-%{version}.tar.gz |
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
||||
BuildRequires: which, pkgconfig, pandoc, gnupg, expect, git, make, automake, autoconf, rpm-build, doxygen, graphviz, java-openjdk @RPM_BUILD_DEPEND@ @RPM_DEPEND_IFEXISTS@ |
||||
|
||||
#### os dependent definitions #### |
||||
%if 0%{?suse_version} || 0%{?sles_version} |
||||
BuildRequires: lsb-release |
||||
%else |
||||
|
||||
%if 0%{?mageia} |
||||
BuildRequires: rpm-sign, lsb-release |
||||
%else |
||||
BuildRequires: rpm-sign, redhat-lsb |
||||
%global debug_package %{nil} |
||||
%endif |
||||
%endif |
||||
%if ! 0%{?centos} |
||||
BuildRequires: mscgen |
||||
%endif |
||||
|
||||
%description |
||||
@README@ |
||||
|
||||
|
||||
%global debug_package %{nil} |
||||
%prep |
||||
%setup -q |
||||
./configure --prefix=/usr \ |
||||
--sysconfdir=/etc \ |
||||
--docdir=/usr/share/doc/packages/@PACKAGE_NAME@ \ |
||||
--libdir=/usr/%_lib |
||||
|
||||
%build |
||||
make |
||||
|
||||
%install |
||||
DESTDIR=$RPM_BUILD_ROOT make install |
||||
|
||||
%clean |
||||
rm -rf $RPM_BUILD_ROOT |
||||
|
||||
%files |
||||
%defattr(-,root,root,-) |
||||
/usr/bin |
||||
/usr/share/applications |
||||
/usr/share/@PACKAGE_NAME@ |
||||
|
||||
%doc |
||||
/usr/share/doc |
||||
|
||||
|
||||
|
||||
%changelog |
||||
|
@ -1,60 +0,0 @@ |
||||
Summary: @DESCRIPTION@ |
||||
Name: @PACKAGE_NAME@ |
||||
Version: @VERSION@ |
||||
Release: @BUILD_NUMBER@%{?dist} |
||||
License: LGPL |
||||
Group: Applications/... |
||||
Source0: %{name}-%{version}.tar.gz |
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
||||
BuildRequires: gnupg, subversion, automake, autoconf, doxygen |
||||
%if 0%{?fedora} != 20 |
||||
BuildRequires: graphviz |
||||
%endif |
||||
%if 0%{?fedora} || 0%{?rhel} || 0%{?rhl} || 0%{?centos} || 0%{?centos_ver} || 0%{?centos_version} |
||||
BuildRequires: pkgconfig, redhat-lsb |
||||
%if ! ( 0%{?centos} || 0%{?centos_ver} || 0%{?centos_version} ) |
||||
BuildRequires: mscgen |
||||
|
||||
%else |
||||
|
||||
%endif |
||||
%else%if 0%{?suse_version} || 0%{?sles_version} |
||||
BuildRequires: pkg-config, lsb-release |
||||
%if 0%{?suse_version} < 1200 || 0%{?sles_version} < 1200 |
||||
|
||||
%else |
||||
|
||||
%endif |
||||
%endif%endif |
||||
|
||||
%description |
||||
@README@ |
||||
|
||||
|
||||
|
||||
%prep |
||||
%setup -q |
||||
./configure --prefix=/usr \ |
||||
--sysconfdir=/etc \ |
||||
--docdir=/usr/share/doc/packages/@PACKAGE_NAME@ \ |
||||
--libdir=/usr/%_lib |
||||
|
||||
%build |
||||
make |
||||
|
||||
%install |
||||
DESTDIR=$RPM_BUILD_ROOT make install |
||||
|
||||
%clean |
||||
rm -rf $RPM_BUILD_ROOT |
||||
|
||||
%files |
||||
%defattr(-,root,root,-) |
||||
/usr/bin/* |
||||
%doc |
||||
/usr/share/* |
||||
|
||||
|
||||
|
||||
%changelog |
||||
|
Loading…
Reference in new issue