Skip to content

Commit

Permalink
Merge branch 'release/1.1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
aronnebrivio committed Apr 25, 2021
2 parents c9f8ed2 + 571b677 commit 7969b95
Show file tree
Hide file tree
Showing 9 changed files with 270 additions and 310 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"laravel",
"lumen"
],
"version": "1.1.1",
"version": "1.1.2",
"license": "MIT",
"type": "project",
"require": {
Expand Down
462 changes: 238 additions & 224 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ services:
environment:
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_USER=${DB_USERNAME}
- MYSQL_PASSWORD=${DB_PASSWORD}
ports:
- ${MYSQL_HOST_PORT}:3306
networks:
Expand Down
22 changes: 22 additions & 0 deletions environments/base/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM php:7.4-apache

# Install PHP and composer dependencies
RUN apt-get update
RUN apt-get install -y git curl libmcrypt-dev libjpeg-dev libpng-dev libonig-dev libfreetype6-dev libbz2-dev libzip-dev zip unzip

# mod_rewrite for URL rewrite and mod_headers for .htaccess extra headers like Access-Control-Allow-Origin-
RUN a2enmod rewrite headers

# Start with base php config
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"

# Install base PHP extensions
RUN docker-php-ext-install opcache pdo_mysql mysqli zip

# Install composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

# Redis
RUN pecl install -o -f redis \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis
23 changes: 1 addition & 22 deletions environments/ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,8 @@
FROM php:7.4-apache

# Install PHP and composer dependencies
RUN apt-get update
RUN apt-get install -y git curl libmcrypt-dev libjpeg-dev libpng-dev libonig-dev libfreetype6-dev libbz2-dev libzip-dev zip unzip

ENV APP_HOME /var/www/html
FROM aronnebrivio/php:7.4-base

# Change uid and gid of apache to docker user uid/gid
RUN usermod -u 1000 www-data && groupmod -g 1000 www-data

# mod_rewrite for URL rewrite and mod_headers for .htaccess extra headers like Access-Control-Allow-Origin-
RUN a2enmod rewrite headers

# Start with base php config, then add extensions
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"

RUN docker-php-ext-install \
opcache \
pdo_mysql \
mysqli \
zip

# Install composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

# Xdebug
RUN pecl install xdebug \
&& docker-php-ext-enable xdebug
Expand Down
28 changes: 1 addition & 27 deletions environments/local/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,41 +1,15 @@
FROM php:7.4-apache

# Install PHP and composer dependencies
RUN apt-get update
RUN apt-get install -y git curl libmcrypt-dev libjpeg-dev libpng-dev libonig-dev libfreetype6-dev libbz2-dev libzip-dev zip unzip

ENV APP_HOME /var/www/html
FROM aronnebrivio/php:7.4-base

# Fix permissions
RUN chmod 1777 /tmp

# Change uid and gid of apache to docker user uid/gid
RUN usermod -u 1000 www-data && groupmod -g 1000 www-data

# mod_rewrite for URL rewrite and mod_headers for .htaccess extra headers like Access-Control-Allow-Origin-
RUN a2enmod rewrite headers

# Start with base php config, then add extensions
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"

RUN docker-php-ext-install \
opcache \
pdo_mysql \
mysqli \
zip

# Install composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

# Xdebug
RUN pecl install xdebug \
&& docker-php-ext-enable xdebug
RUN echo "xdebug.start_with_request=yes" >> $PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini
RUN echo "xdebug.discover_client_host=1" >> $PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini
RUN echo "xdebug.idekey=BEST_IDE" >> $PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini
RUN echo "xdebug.client_host=host.docker.internal" >> $PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini

# Redis
RUN pecl install -o -f redis \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis
39 changes: 6 additions & 33 deletions environments/production/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,7 @@
FROM php:7.4-apache

# Install PHP and composer dependencies
RUN apt-get update
RUN apt-get install -y git curl libmcrypt-dev libjpeg-dev libpng-dev libonig-dev libfreetype6-dev libbz2-dev libzip-dev
FROM aronnebrivio/php:7.4-base

ENV APP_HOME /var/www/html

# Change uid and gid of apache to docker user uid/gid
RUN usermod -u 1000 www-data && groupmod -g 1000 www-data

# mod_rewrite for URL rewrite and mod_headers for .htaccess extra headers like Access-Control-Allow-Origin-
RUN a2enmod rewrite headers

# Start with base php config, then add extensions
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"

RUN docker-php-ext-install \
opcache \
pdo_mysql \
mysqli \
zip

# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

# Redis
RUN pecl install -o -f redis \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis

# Load environment variables from build args
ARG DB_HOST
ARG DB_DATABASE
Expand All @@ -52,7 +25,7 @@ ENV JWT_SECRET=$JWT_SECRET

# Copy source and install dependencies
COPY . $APP_HOME
RUN mv environments/production/.env .env
COPY environments/production/.env .env
RUN composer install

# Run migrations
Expand All @@ -65,7 +38,7 @@ RUN rm -rf .github .vscode database environments private tests \
# Change ownership of our applications
RUN chown -R www-data:www-data $APP_HOME

# Start Apache
COPY environments/production/run-apache2.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/run-apache2.sh
CMD ["run-apache2.sh"]
# Start
COPY environments/production/start.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/start.sh
CMD ["start.sh"]
File renamed without changes.
2 changes: 1 addition & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
});

$router->get('version', function () {
return response('1.1.1', 200);
return response('1.1.2', 200);
});

$router->group(['prefix' => 'auth'], function () use ($router) {
Expand Down

0 comments on commit 7969b95

Please sign in to comment.