summaryrefslogtreecommitdiffstats
path: root/Services
diff options
context:
space:
mode:
Diffstat (limited to 'Services')
-rw-r--r--Services/apache/Dockerfile8
-rw-r--r--Services/apache/README.md4
-rw-r--r--Services/apache/docker-compose.yml16
-rw-r--r--Services/apache/sx-httpd.sh6
-rw-r--r--Services/php/Dockerfile4
-rw-r--r--Services/php/README.md2
-rw-r--r--Services/php/docker-compose.yml18
-rw-r--r--Services/php/php.ini1
8 files changed, 29 insertions, 30 deletions
diff --git a/Services/apache/Dockerfile b/Services/apache/Dockerfile
index 24dc063..4e67fd4 100644
--- a/Services/apache/Dockerfile
+++ b/Services/apache/Dockerfile
@@ -5,9 +5,9 @@ USER root
RUN dnf -y install httpd && \
dnf clean all
ENV HTTPDCONF=/etc/httpd/conf.d/app.conf \
- STARTUPLOG=/data/logs/httpd/startup.log \
- LOG_PATH=/data/logs/httpd \
- APP_PATH=/data/httpd
+ STARTUPLOG=/data/logs/apache/startup.log \
+ LOG_PATH=/data/logs/apache \
+ APP_PATH=/data/apache
COPY httpd.conf $HTTPDCONF
COPY *.sh /bin/
RUN chmod 775 /bin/run.sh /bin/sx-httpd.sh && \
@@ -15,8 +15,8 @@ RUN chmod 775 /bin/run.sh /bin/sx-httpd.sh && \
rm -f /etc/httpd/conf.d/autoindex.conf && \
rm -f /etc/httpd/conf.d/welcome.conf && \
mkdir /data && \
- mkdir $APP_PATH && \
mkdir /data/logs && \
+ mkdir $APP_PATH && \
mkdir $LOG_PATH && \
touch $STARTUPLOG
COPY ./ $APP_PATH
diff --git a/Services/apache/README.md b/Services/apache/README.md
index d775b03..eb4fdec 100644
--- a/Services/apache/README.md
+++ b/Services/apache/README.md
@@ -1,12 +1,12 @@
# STARTX Services docker-images : Simple Webserver
-Container running httpd daemon under a fedora server
+Container running apache httpd daemon under a fedora server
## Running from docker registry
docker run -d -p 80:80 --name="apache" startx/sv-apache
# when used with a volume container (run data container, then run service)
- docker run -d -v /var/www/html -v /var/log/httpd --name apache-data startx/sv-apache echo "Data container for apache"
+ docker run -d -v /var/www/html -v /var/logs/apache --name apache-data startx/sv-apache echo "Data container for apache"
docker run -d -p 80:80 --volumes-from apache-data --name="apache" startx/sv-apache
# when used in a linked container
docker run -d --name="apache" startx/sv-apache
diff --git a/Services/apache/docker-compose.yml b/Services/apache/docker-compose.yml
index 205a439..8e951bc 100644
--- a/Services/apache/docker-compose.yml
+++ b/Services/apache/docker-compose.yml
@@ -1,17 +1,17 @@
-httpd:
+server:
build: ./
-# image: sx-httpd
- container_name: "sx-httpd"
+# image: sv-apache
+ container_name: "apache-server"
mem_limit: 1g
memswap_limit: 2g
cpu_shares: 2
restart: "on-failure:2"
environment:
CONTAINER_TYPE: "service"
- CONTAINER_SERVICE: "httpd"
- CONTAINER_INSTANCE: "sx-httpd"
+ CONTAINER_SERVICE: "apache"
+ CONTAINER_INSTANCE: "service-apache"
SERVER_NAME: "localhost"
- DOC_ROOT: "/data/httpd"
+ DOC_ROOT: "/data/apache"
volumes:
- - "/tmp/container/logs/httpd:/data/logs/httpd"
- - "/tmp/container/httpd:/data/httpd" \ No newline at end of file
+ - "/tmp/container/logs/apache:/data/logs/apache"
+ - "/tmp/container/apache:/data/apache" \ No newline at end of file
diff --git a/Services/apache/sx-httpd.sh b/Services/apache/sx-httpd.sh
index 363e74f..c955689 100644
--- a/Services/apache/sx-httpd.sh
+++ b/Services/apache/sx-httpd.sh
@@ -8,15 +8,15 @@ function check_httpd_environment {
echo "! WARNING : auto-assigned value : $SERVER_NAME"
fi
if [ ! -v DOC_ROOT ]; then
- DOC_ROOT="/data/httpd"
+ DOC_ROOT="/data/apache"
export DOC_ROOT
fi
if [ ! -v APP_PATH ]; then
- APP_PATH="/data/httpd"
+ APP_PATH="/data/apache"
export APP_PATH
fi
if [ ! -v LOG_PATH ]; then
- LOG_PATH="/data/logs/httpd"
+ LOG_PATH="/data/logs/apache"
export LOG_PATH
fi
}
diff --git a/Services/php/Dockerfile b/Services/php/Dockerfile
index 8bb0304..62b9564 100644
--- a/Services/php/Dockerfile
+++ b/Services/php/Dockerfile
@@ -8,8 +8,8 @@ RUN dnf -y install php php-pecl-mongo php-cli php-pear \
php-bcmath php-pecl-zip php-php-gettext php-tcpdf \
php-tcpdf-dejavu-sans-fonts php-tidy \
&& dnf clean all
-ENV LOG_PATH=/data/logs/httpd_php \
- APP_PATH=/data/httpd_php
+ENV LOG_PATH=/data/logs/apache_php \
+ APP_PATH=/data/apache_php
COPY httpd.conf $HTTPDCONF
COPY php.ini /etc/php.d/sx.ini
COPY run.sh /bin/
diff --git a/Services/php/README.md b/Services/php/README.md
index 370a3a8..7ceef27 100644
--- a/Services/php/README.md
+++ b/Services/php/README.md
@@ -6,7 +6,7 @@ Container running apache + php daemon under a fedora server
docker run -d -p 80:80 --name="php" startx/sv-php
# when used with a volume container (run data container, then run service)
- docker run -d -v /var/www/html -v /var/logs/httpd --name php-data startx/sv-php echo "Data container for php webserver"
+ docker run -d -v /var/www/html -v /var/logs/apache_php --name php-data startx/sv-php echo "Data container for php webserver"
docker run -d -p 80:80 --volumes-from php-data --name="php" startx/sv-php
when linked to another container
docker run -d --name="mongo" startx/sv-mongo
diff --git a/Services/php/docker-compose.yml b/Services/php/docker-compose.yml
index 2f410ce..04f7ac3 100644
--- a/Services/php/docker-compose.yml
+++ b/Services/php/docker-compose.yml
@@ -1,17 +1,17 @@
-httpd_php:
+server:
build: ./
-# image: sx-httpd_php
- container_name: "sx-httpd_php"
+# image: sx-php
+ container_name: "php-server"
mem_limit: 1g
memswap_limit: 2g
- cpu_shares: 2
+ cpu_shares: 4
restart: "on-failure:2"
environment:
CONTAINER_TYPE: "service"
- CONTAINER_SERVICE: "httpd_php"
- CONTAINER_INSTANCE: "sx-httpd_php"
+ CONTAINER_SERVICE: "php"
+ CONTAINER_INSTANCE: "service-apache_php"
SERVER_NAME: "localhost"
- DOC_ROOT: "/data/httpd_php"
+ DOC_ROOT: "/data/apache_php"
volumes:
- - "/tmp/container/logs/httpd_php:/data/logs/httpd_php"
- - "/tmp/container/httpd_php:/data/httpd_php" \ No newline at end of file
+ - "/tmp/container/logs/apache_php:/data/logs/apache_php"
+ - "/tmp/container/apache_php:/data/apache_php" \ No newline at end of file
diff --git a/Services/php/php.ini b/Services/php/php.ini
index 4207ce3..133ab2c 100644
--- a/Services/php/php.ini
+++ b/Services/php/php.ini
@@ -1,4 +1,3 @@
-; This file will be copied into /etc/php.d/sx.ini and loaded when httpd start
display_errors = On
always_populate_raw_post_data = On