diff options
Diffstat (limited to 'docker/dev')
-rw-r--r-- | docker/dev/.env | 3 | ||||
-rw-r--r-- | docker/dev/Dockerfile | 19 | ||||
-rw-r--r-- | docker/dev/docker-compose.yml | 80 |
3 files changed, 102 insertions, 0 deletions
diff --git a/docker/dev/.env b/docker/dev/.env new file mode 100644 index 00000000..f1622708 --- /dev/null +++ b/docker/dev/.env @@ -0,0 +1,3 @@ +COMPOSE_PROJECT_NAME="engelsystem_dev" +UID=1000 +GID=1000 diff --git a/docker/dev/Dockerfile b/docker/dev/Dockerfile new file mode 100644 index 00000000..ef514102 --- /dev/null +++ b/docker/dev/Dockerfile @@ -0,0 +1,19 @@ +# Engelsystem PHP FPM development image including Xdebug +FROM php:7-fpm-alpine AS es_php_fpm +WORKDIR /var/www +RUN apk add --no-cache icu-dev $PHPIZE_DEPS && \ + pecl install xdebug && \ + docker-php-ext-install intl pdo_mysql && \ + docker-php-ext-enable xdebug +RUN echo -e "xdebug.remote_enable=1\nxdebug.remote_connect_back=1\n" >> /usr/local/etc/php/conf.d/xdebug.ini + +ENV TRUSTED_PROXIES 10.0.0.0/8,::ffff:10.0.0.0/8,\ + 127.0.0.0/8,::ffff:127.0.0.0/8,\ + 172.16.0.0/12,::ffff:172.16.0.0/12,\ + 192.168.0.0/16,::ffff:192.168.0.0/16,\ + ::1/128,fc00::/7,fec0::/10 + +# Engelsystem development workspace +# Contains all tools required to build / manage the system +FROM es_php_fpm AS es_workspace +RUN apk add --no-cache composer gettext nodejs npm yarn diff --git a/docker/dev/docker-compose.yml b/docker/dev/docker-compose.yml new file mode 100644 index 00000000..858d6232 --- /dev/null +++ b/docker/dev/docker-compose.yml @@ -0,0 +1,80 @@ +version: "3.6" +services: + es_nginx: + image: es_dev_nginx + build: + context: ./../.. + dockerfile: docker/nginx/Dockerfile + target: es_nginx + volumes: + - ./../..:/var/www + ports: + - 5000:80 + networks: + - internal + depends_on: + - es_php_fpm + es_php_fpm: + image: es_dev_php_fpm + build: + context: ./../.. + dockerfile: docker/dev/Dockerfile + target: es_php_fpm + user: "${UID}:${GID}" + volumes: + - ./../..:/var/www + environment: + MYSQL_HOST: es_database + MYSQL_USER: engelsystem + MYSQL_PASSWORD: engelsystem + MYSQL_DATABASE: engelsystem + PHP_IDE_CONFIG: serverName=engelsystem + ENVIRONMENT: development + MAIL_DRIVER: log + APP_NAME: Engelsystem DEV + networks: + - internal + - database + depends_on: + - es_database + es_workspace: + image: es_dev_workspace + build: + context: ./../.. + dockerfile: docker/dev/Dockerfile + target: es_workspace + user: "${UID}:${GID}" + volumes: + - ./../..:/var/www + environment: + HOME: /tmp + MYSQL_HOST: es_database + MYSQL_USER: engelsystem + MYSQL_PASSWORD: engelsystem + MYSQL_DATABASE: engelsystem + ENVIRONMENT: development + MAIL_DRIVER: log + APP_NAME: Engelsystem DEV + networks: + - internal + - database + depends_on: + - es_database + es_database: + image: mariadb:10.2 + environment: + MYSQL_DATABASE: engelsystem + MYSQL_USER: engelsystem + MYSQL_PASSWORD: engelsystem + MYSQL_RANDOM_ROOT_PASSWORD: 1 + MYSQL_INITDB_SKIP_TZINFO: "yes" + volumes: + - db:/var/lib/mysql + networks: + - database +volumes: + db: {} + +networks: + internal: + database: |