summaryrefslogtreecommitdiffstats
path: root/Services/apache
diff options
context:
space:
mode:
authorstartxfr <clarue@startx.fr>2015-11-28 20:11:25 +0100
committerstartxfr <clarue@startx.fr>2015-11-28 20:11:25 +0100
commit59bbf66b7b1e4490694f2c5f732ddf9380acf053 (patch)
tree4fa52b027fc6df1c9b50c3fbaf740086b595b786 /Services/apache
parent348568c89ae1ad19270e930c02a1492bc43e99b1 (diff)
downloadphpmyadmin-59bbf66b7b1e4490694f2c5f732ddf9380acf053.tar.gz
phpmyadmin-59bbf66b7b1e4490694f2c5f732ddf9380acf053.tar.bz2
phpmyadmin-59bbf66b7b1e4490694f2c5f732ddf9380acf053.tar.xz
phpmyadmin-59bbf66b7b1e4490694f2c5f732ddf9380acf053.zip
debugging on services. renaming service and use of extends in global docker-copose used in test
Diffstat (limited to 'Services/apache')
-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
4 files changed, 17 insertions, 17 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
}