Last active
May 29, 2022 19:46
-
-
Save kinow/8a0bc5240cebc78c3b3bc4710a42315d to your computer and use it in GitHub Desktop.
Skosmos Dockerfile mods for xdebug + docker + phpstorm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/docker-compose.yml b/docker-compose.yml | |
index a6669a9..58cc204 100644 | |
--- a/docker-compose.yml | |
+++ b/docker-compose.yml | |
@@ -15,6 +15,8 @@ services: | |
# - ${PWD}/fuseki:/fuseki | |
web: | |
container_name: skosmos | |
+ environment: | |
+ XDEBUG_CONFIG: remote_host=172.18.0.1 | |
build: . | |
volumes: | |
- .:/var/www/html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/dockerfiles/Dockerfile.ubuntu b/dockerfiles/Dockerfile.ubuntu | |
index e55e0912..4389578c 100644 | |
--- a/dockerfiles/Dockerfile.ubuntu | |
+++ b/dockerfiles/Dockerfile.ubuntu | |
@@ -75,8 +75,8 @@ COPY composer.json /var/www/html | |
RUN php composer.phar install --no-dev --no-autoloader | |
# skosmos layer | |
-COPY . /var/www/html | |
-RUN php composer.phar install --no-dev | |
+# COPY . /var/www/html | |
+# RUN php composer.phar install --no-dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Dockerfile b/Dockerfile | |
index 9abc4e0..75e23f1 100644 | |
--- a/Dockerfile | |
+++ b/Dockerfile | |
@@ -1,4 +1,4 @@ | |
-FROM php:7.0-apache | |
+FROM php:7.2-apache | |
RUN apt-get update | |
@@ -10,5 +10,15 @@ RUN echo "fi_FI.UTF-8 UTF-8" >> /etc/locale.gen | |
RUN echo "sv_SE.UTF-8 UTF-8" >> /etc/locale.gen | |
RUN locale-gen | |
+RUN yes | pecl install xdebug && docker-php-ext-enable xdebug \ | |
+ && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" >> /usr/local/etc/php/php.ini \ | |
+ && echo "xdebug.remote_port=9000" >> /usr/local/etc/php/php.ini \ | |
+ && echo "xdebug.remote_enable=1" >> /usr/local/etc/php/php.ini \ | |
+ && echo "xdebug.remote_connect_back=0" >> /usr/local/etc/php/php.ini \ | |
+ && echo "xdebug.remote_host=docker.for.mac.localhost" >> /usr/local/etc/php/php.ini \ | |
+ && echo "xdebug.idekey=IDEA_DEBUG" >> /usr/local/etc/php/php.ini \ | |
+ && echo "xdebug.remote_autostart=1" >> /usr/local/etc/php/php.ini \ | |
+ && echo "xdebug.remote_log=/tmp/xdebug.log" >> /usr/local/etc/php/php.ini | |
+ | |
RUN a2enmod rewrite | |
RUN docker-php-ext-install gettext |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/dockerfiles/docker-compose.yml b/dockerfiles/docker-compose.yml | |
index f35a0e2c..6fc13f45 100644 | |
--- a/dockerfiles/docker-compose.yml | |
+++ b/dockerfiles/docker-compose.yml | |
@@ -4,7 +4,7 @@ services: | |
fuseki: | |
container_name: skosmos-fuseki | |
hostname: fuseki | |
- image: stain/jena-fuseki | |
+ image: stain/jena-fuseki:4.0.0 | |
environment: | |
- ADMIN_PASSWORD=admin | |
- JVM_ARGS=-Xmx2g | |
@@ -21,7 +21,7 @@ services: | |
fuseki-cache: | |
container_name: skosmos-fuseki-cache | |
hostname: fuseki-cache | |
- image: varnish | |
+ image: varnish:6.0.10 | |
ports: | |
- 9031:80 | |
volumes: | |
@@ -41,5 +41,5 @@ services: | |
- fuseki-cache | |
volumes: | |
- type: bind | |
- source: ./config/config-docker-compose.ttl | |
- target: /var/www/html/config.ttl | |
+ source: ../ | |
+ target: /var/www/html/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment