Jelajahi Sumber

always restart and other port forwarding

Klumpp, Paul-Dieter 7 tahun lalu
induk
melakukan
46d282151d
2 mengubah file dengan 3 tambahan dan 3 penghapusan
  1. 1 1
      Dockerfile
  2. 2 2
      docker-compose.yml

+ 1 - 1
Dockerfile

@@ -3,6 +3,7 @@ MAINTAINER Paul Klumpp
 ENV HTDOCS /usr/local/apache2/htdocs
 ENV DATA /opt/dada
 WORKDIR $HTDOCS
+VOLUME ["$DATA", "$HTDOCS"]
 
 RUN usermod -d $DATA daemon
 RUN mkdir -p $DATA && chown -R daemon:daemon $DATA && chmod 2755 $DATA
@@ -26,7 +27,6 @@ ADD https://raw.github.com/justingit/dada-mail/v10_7_0-stable_2017_07_05/uncompr
 RUN chmod 0755 uncompress_dada.cgi && /usr/bin/perl -T uncompress_dada.cgi && rm uncompress_dada.cgi
 RUN echo '*/5 * * * * /usr/bin/curl --user-agent "Mozilla/5.0 (compatible;)" --silent --get --url http://localhost/dada/mail.cgi/_schedules/_all/_all/_silent/' > /var/spool/cron/crontabs/root 
 RUN mkdir -p $HTDOCS/dada_mail_support_files && chown -R daemon:daemon $HTDOCS && chmod 2755 $HTDOCS
-VOLUME ["$DATA", "$HTDOCS"]
 
 USER root
 CMD service cron start && httpd-foreground

+ 2 - 2
docker-compose.yml

@@ -5,14 +5,14 @@ services:
     container_name: dada_dada
     restart: always
     ports:
-      - "8080:80"
+      - "10083:80"
     volumes:
       - dada-home:/opt/dada
       - dada-htdocs:/usr/local/apache2/htdocs
 
   mysql:
     image: mariadb
-    container_name: dada_mysql
+    container_name: dada_mariadb
     restart: always
     environment:
       MYSQL_ROOT_PASSWORD: s3crets4uc3