Changeset 1612 in genapp


Ignore:
Timestamp:
Dec 5, 2018, 8:53:36 AM (3 years ago)
Author:
ehb
Message:

Sync with genappalpha

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dockerfiles/seedme2/Dockerfile

    r1598 r1612  
    185185
    186186## need to expose mongod
     187ENV MONGO_DOMAIN genapp_docker_mongo
     188
    187189### generate certs
    188190
     191RUN sed "1s/127.0.0.1\tlocalhost/127.0.0.1\tlocalhost\tgenapp_docker_mongo/" /etc/hosts > /etc/hosts.$MONGO_DOMAIN
     192RUN cat /etc/hosts.$MONGO_DOMAIN
     193
    189194RUN cd /etc/ssl/ && \
    190     openssl req -newkey rsa:2048 -new -subj '/C=US/CN=127.0.0.1' -x509 -days 365 -nodes -out mongodb-cert.crt -keyout mongodb-cert.key && \
     195    openssl req -newkey rsa:2048 -new -subj "/C=US/CN=$MONGO_DOMAIN" -x509 -days 365 -nodes -out mongodb-cert.crt -keyout mongodb-cert.key && \
    191196    cat mongodb-cert.key mongodb-cert.crt > mongodb.pem
    192197
     
    220225    PEMKeyFile: /etc/ssl/mongodb.pem\n\
    221226# to avoid "The server certificate does not match the hostname\n\
    222 #   allowInvalidHostnames: true\n\
     227# this doesn't seem to work (or I'm not understanding its meaning\n\
     228# what happens is that we still get invalid hostname in cert errors\n\
     229# alternative was to use the domain name trick (editing /etc/hosts)\n\
     230#    allowInvalidHostnames: true\n\
    223231\n\
    224232# how the process runs\n\
     
    243251### add to config.json
    244252RUN . /etc/profile.d/genapp.sh && \
    245     $GENAPP/sbin/setconfig.pl -mongossl 127.0.0.1 /etc/ssl/mongodb-cert.crt && \
     253    $GENAPP/sbin/setconfig.pl -mongossl $MONGO_DOMAIN /etc/ssl/mongodb-cert.crt && \
    246254    $GENAPP/sbin/reconfig
    247255RUN /etc/init.d/apache2 stop && \
     
    249257
    250258# forever loop
    251 CMD /etc/init.d/mongodb start && \
     259CMD cp /etc/hosts.$MONGO_DOMAIN /etc/hosts && \
     260    cat /etc/hosts && \
     261    cat /etc/ssl/mongodb-cert.crt && \
     262    /etc/init.d/mongodb start && \
    252263    /etc/init.d/rc.genapp start && \
    253264    /etc/init.d/apache2 start && \
Note: See TracChangeset for help on using the changeset viewer.