|
@@ -1,41 +1,27 @@
|
|
|
FROM docker.infra.flowdat.com/fd3/sf-php:latest
|
|
|
-EXPOSE 8000
|
|
|
|
|
|
ADD . /opt/ftth
|
|
|
|
|
|
WORKDIR /opt/ftth
|
|
|
|
|
|
-RUN rm -rf /opt/ftth/vendor/*
|
|
|
-RUN rm -f app/config/parameters.yml
|
|
|
-RUN rm -f app/config/url_webservice.yml
|
|
|
-RUN rm -f app/config/hwioauthbundle/parameters.yml
|
|
|
-
|
|
|
-# estos archivos deben ser generados con su correspondiente .dist desde el composer.
|
|
|
-#RUN cp app/config/parameters.yml.docker app/config/parameters.yml
|
|
|
-#RUN cp app/config/url_webservice.yml.docker app/config/url_webservice.yml
|
|
|
-#RUN cp app/config/hwioauthbundle/parameters.yml.docker app/config/hwioauthbundle/parameters.yml
|
|
|
-#RUN cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml
|
|
|
-
|
|
|
-RUN rm -rf /opt/ftth/app/config/parameters.yml /opt/ftth/app/config/url_webservice.yml
|
|
|
-
|
|
|
-RUN apt-get update && apt-get install -yq php-soap python-pip
|
|
|
-
|
|
|
-RUN chmod 0600 /opt/keys/*
|
|
|
-RUN eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; composer install --no-scripts --no-interaction --no-progress
|
|
|
-
|
|
|
-RUN eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; git clone git@bitbucket.org:ikflowdat/extra.git /opt/extra ; cp -r /opt/extra/netmiko /opt/netmiko ; rm -rf /opt/extra
|
|
|
-RUN pip install -e /opt/netmiko
|
|
|
-RUN pip install paramiko argparse
|
|
|
-
|
|
|
-RUN eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; git clone git@bitbucket.org:ikflowdat/json-wsdl.git /opt/json-wsdl ; cd /opt/json-wsdl ; composer install --no-scripts --no-interaction --no-progress
|
|
|
-
|
|
|
-#RUN cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml ;\
|
|
|
-# cp app/config/url_webservice.yml.docker app/config/url_webservice.yml ;\
|
|
|
-# cp app/config/hwioauthbundle/parameters.yml.docker app/config/hwioauthbundle/parameters.yml ;\
|
|
|
-# cp app/config/bundles/ik/device-bundle/parameters.yml.docker app/config/bundles/ik/device-bundle/parameters.yml ;\
|
|
|
-# cp app/config/bundles/ik/base-admin-bundle/parameters.yml.dist app/config/bundles/ik/base-admin-bundle/parameters.yml
|
|
|
-
|
|
|
-RUN apt-get update && apt-get install -yq php-fpm; \
|
|
|
+RUN chmod 0600 /opt/keys/*; \
|
|
|
+ eval $(ssh-agent); \
|
|
|
+ ssh-add /opt/keys/bitbucket.id_rsa; \
|
|
|
+ rm -f app/config/parameters.yml \
|
|
|
+ app/config/url_webservice.yml \
|
|
|
+ app/config/hwioauthbundle/parameters.yml \
|
|
|
+ app/config/parameters.yml \
|
|
|
+ app/config/url_webservice.yml; \
|
|
|
+ composer install --no-scripts --no-interaction --no-progress; \
|
|
|
+ git clone git@bitbucket.org:ikflowdat/extra.git /opt/extra; \
|
|
|
+ cp -r /opt/extra/netmiko /opt/netmiko; \
|
|
|
+ rm -rf /opt/extra; \
|
|
|
+ pip install -e /opt/netmiko; \
|
|
|
+ pip install paramiko argparse; \
|
|
|
+ git clone git@bitbucket.org:ikflowdat/json-wsdl.git /opt/json-wsdl; \
|
|
|
+ cd /opt/json-wsdl; \
|
|
|
+ composer install --no-scripts --no-interaction --no-progress; \
|
|
|
+ cd /opt/ftth; \
|
|
|
mkdir -p /run/php; \
|
|
|
sed -i 's#listen = /run/php/php7.0-fpm.sock#listen = /run/php/ftth.sock#g' /etc/php/7.0/fpm/pool.d/www.conf; \
|
|
|
sed -i 's#listen = 0.0.0.0:9000#listen = /run/php/ftth.sock#g' /etc/php/7.0/fpm/pool.d/www.conf; \
|
|
@@ -46,15 +32,13 @@ RUN apt-get update && apt-get install -yq php-fpm; \
|
|
|
sed -i 's#listen.group = www-data#listen.group = root#g' /etc/php/7.0/fpm/pool.d/www.conf; \
|
|
|
sed -i 's#;listen.mode = 0660#listen.mode = 0777#g' /etc/php/7.0/fpm/pool.d/www.conf; \
|
|
|
sed -i 's#pm.max_children = 5#pm.max_children = 10#g' /etc/php/7.0/fpm/pool.d/www.conf; \
|
|
|
- sed -i 's#;pm.max_requests = 500#pm.max_requests = 500#g' /etc/php/7.0/fpm/pool.d/www.conf
|
|
|
-
|
|
|
-CMD env ; cp /opt/ftth/keys/fullchain.pem /usr/share/ca-certificates/$HOST_BASE ;\
|
|
|
- cat /usr/local/share/ca-certificates/$HOST_BASE ;\
|
|
|
- echo $HOST_BASE >> /etc/ca-certificates.conf ;\
|
|
|
- update-ca-certificates ;\
|
|
|
- eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; composer install --no-scripts --no-interaction --no-progress;\
|
|
|
- rm var/cache/* -rf ;\
|
|
|
- composer run-script post-install-cmd --no-interaction ;\
|
|
|
- cat app/config/hwioauthbundle/parameters.yml ;\
|
|
|
- chmod 777 -R var/cache/ var/logs/ var/sessions/ ;\
|
|
|
+ sed -i 's#;pm.max_requests = 500#pm.max_requests = 500#g' /etc/php/7.0/fpm/pool.d/www.conf; \
|
|
|
+ chmod 777 -R var/cache/ var/logs/ var/sessions/
|
|
|
+
|
|
|
+CMD env; \
|
|
|
+ cp /opt/ftth/keys/fullchain.pem /usr/share/ca-certificates/$HOST_BASE; \
|
|
|
+ echo $HOST_BASE >> /etc/ca-certificates.conf; \
|
|
|
+ update-ca-certificates; \
|
|
|
+ rm -rf var/cache/*; \
|
|
|
+ composer run-script post-install-cmd --no-interaction; \
|
|
|
php-fpm7.0 -F -R -O
|