Skip to content

Commit

Permalink
Posta bidezko kanaleak, helbidea osatu XXXX UDALA + KALEA + POSTA KOD…
Browse files Browse the repository at this point in the history
…EA + HERRIA jarriz
  • Loading branch information
ikerib committed Sep 22, 2023
1 parent 58176c8 commit db419f0
Show file tree
Hide file tree
Showing 6 changed files with 2,764 additions and 28 deletions.
10 changes: 4 additions & 6 deletions .env
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
###> DOCKER ###
DOCKER_MYSQL_USER=dbuser
DOCKER_MYSQL_ROOT_PASSWORD=dbpass
DOCKER_MYSQL_DATABASE=zerbikat
DOCKER_TIMEZONE="Europe/Madrid"
PHP_IDE_CONFIG="serverName=zerbikat.test"
XDEBUG_CONFIG="remote_host=192.168.2.8 remote_port=9000"
XDEBUG_CONFIG="remote_host=172.28.64.123 remote_port=9000"
WITH_XDEBUG=true
USER_ID=1000
GROUP_ID=1000

USER_ID=1463240267
GROUP_ID=1463200513
###< DOCKER ###
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
/.idea/Zerbikat.iml
!/.env.local
.env.local
/node_modules/
11 changes: 7 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ services:
volumes:
- mariadb_zerbikat:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=pasaia
- MYSQL_ROOT_PASSWORD=dbpass
- MYSQL_DATABASE=zerbikat
- MYSQL_USER=pasaia
- MYSQL_PASSWORD=pasaia
- MYSQL_USER=dbuser
- MYSQL_PASSWORD=dbpass

ports:
- "3306:3306"
networks:
- zerbikatnet

app:
container_name: zerbikat-php
env_file: ./.env
Expand All @@ -33,9 +35,10 @@ services:
environment:
- APP_ENV=dev
- PHP_IDE_CONFIG=serverName=zerbikat.test
- XDEBUG_CONFIG=remote_host=192.168.2.8
- XDEBUG_CONFIG=remote_host=172.28.64.123
networks:
- zerbikatnet

nginx:
container_name: zerbikat-nginx
image: nginx:1.15.3-alpine
Expand Down
33 changes: 23 additions & 10 deletions docker/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ RUN userdel -f www-data &&\

#USER www-data
RUN echo 'www-data ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

RUN sed -i -e 's/deb.debian.org/archive.debian.org/g' \
-e 's|security.debian.org|archive.debian.org/|g' \
-e '/stretch-updates/d' /etc/apt/sources.list
RUN apt-get update && apt-get install -y \
openssl \
git \
Expand All @@ -39,8 +41,22 @@ RUN apt-get update && apt-get install -y \
&& echo "LC_ALL=es_ES.UTF-8" >> /etc/default/locale \
&& echo "LANG=es_ES.UTF-8" >> /etc/default/locale

RUN pecl install xdebug-2.5.5 && docker-php-ext-enable xdebug && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" >> /usr/local/etc/php/php.ini && echo "error_reporting = E_ALL" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && echo "display_startup_errors = On" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && echo "display_errors = On" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && echo "xdebug.remote_connect_back=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini

#RUN pecl install xdebug-2.5.5 && docker-php-ext-enable xdebug && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" >> /usr/local/etc/php/php.ini && echo "error_reporting = E_ALL" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && echo "display_startup_errors = On" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && echo "display_errors = On" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && echo "xdebug.remote_connect_back=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN cd /tmp && \
git clone https://github.com/xdebug/xdebug.git && \
cd xdebug && \
git checkout XDEBUG_2_5_5 && \
phpize && \
./configure --enable-xdebug && \
make && \
make install && \
rm -rf /tmp/xdebug && \
echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" >> /usr/local/etc/php/php.ini && \
echo "error_reporting = E_ALL" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
echo "display_startup_errors = On" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "display_errors = On" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
echo "xdebug.remote_connect_back=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini

RUN docker-php-ext-install pdo pdo_mysql

Expand Down Expand Up @@ -73,14 +89,11 @@ RUN echo memory_limit = 512M >> /usr/local/etc/php/conf.d/zerbikat.ini
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& composer --version

# zsh eta oh my zsh
RUN apt install -y zsh wget

USER www-data
RUN wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh || true
COPY ./docker/php/conf/.zshrc /home/www-data/.zshrc

RUN apt-get install curl -y
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
RUN apt-get update && apt-get install nodejs

RUN npm install gulp bower

WORKDIR /usr/src/app

Expand Down
Loading

0 comments on commit db419f0

Please sign in to comment.