docker-compose for development

This commit is contained in:
2022-09-20 20:08:43 +02:00
parent 1101f34164
commit ae0b27a1bf
183 changed files with 2260 additions and 19 deletions

View File

@@ -0,0 +1,42 @@
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
# Always set these headers.
# Header always set Access-Control-Allow-Origin "*"
# Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
# Header always set Access-Control-Max-Age "1000"
#Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token"
# Added a rewrite to respond with a 200 SUCCESS on every OPTIONS request.
# RewriteEngine On
# RewriteCond %{REQUEST_METHOD} OPTIONS
# RewriteRule ^(.*)$ $1 [R=200,L]
</VirtualHost>

View File

@@ -0,0 +1,60 @@
FROM ubuntu:16.04
MAINTAINER rocho02@gmail.com
# apt-get
RUN apt-get update \
&& apt-get -y install bzip2 git nano wget zip unzip curl vim \
&& apt-get -y install libmcrypt-dev libzzip-dev zziplib-bin zlib1g-dev \
&& apt-get -y install apache2
# && ufw allow in "Apache Full" \
RUN apt-get -y install php \
libapache2-mod-php \
php-mcrypt \
php-mysql \
php-xml \
php7.0-gd \
php7.0-mbstring \
php7.0-zip
RUN apt-get -y install php-xdebug php-soap php-curl
RUN apt-get -y install \
# Required by composer
git \
zlib1g-dev \
--no-install-recommends
RUN mkdir -p /var/www/html/api && mkdir -p /var/www/html/admin && mkdir -p /var/www/html/public
WORKDIR /var/www
RUN a2enmod headers
RUN a2enmod rewrite
COPY 000-default.conf /etc/apache2/sites-available/
COPY index.html /var/www/html/
# Ports
EXPOSE 80
RUN FILE=/etc/php/7.0/apache2/php.ini \
&& echo "\n" >> $FILE \
&& echo "\n# Added for xdebug" >> $FILE \
&& echo "\nzend_extension=\"/usr/lib/php/20151012/xdebug.so\" " >> $FILE \
&& echo "\nxdebug.remote_enable=1 " >> $FILE \
&& echo "\nxdebug.remote_handler=dbgp " >> $FILE \
&& echo "\nxdebug.remote_mode=req " >> $FILE \
&& echo "\nxdebug.remote_host=172.17.0.1 " >> $FILE \
&& echo "\nxdebug.remote_port=9000 " >> $FILE \
&& echo "\nxdebug.remote_connect_back=1 " >> $FILE \
&& echo "\n" >> $FILE
ENV XDEBUG_CONFIG="idekey=PHPSTORM"
# Default command
CMD ["apachectl", "-D", "FOREGROUND"]

View File

@@ -0,0 +1,11 @@
<html>
<head>
</head>
<body>
<a href="fitness_web/backend/web/index.php">Fitness Web Backend</a>
<br>
<a href="fitness_web/frontend/web/index.php">Fitness Web Frontend</a>
</body>
</html>

View File

@@ -0,0 +1,17 @@
#!/bin/sh
EXPECTED_SIGNATURE=$(curl https://composer.github.io/installer.sig)
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');")
if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]
then
>&2 echo 'ERROR: Invalid installer signature'
rm composer-setup.php
exit 1
fi
php composer-setup.php --install-dir=/usr/bin --filename=composer
RESULT=$?
rm composer-setup.php
exit $RESULT