Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 RELEASE: Version 1.2.0 #136

Merged
merged 9 commits into from
May 10, 2021
9 changes: 5 additions & 4 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-sel
&& sudo apt-get clean

COPY --chown=gitpod:gitpod .gp/conf/xdebug/xdebug.ini /tmp
RUN wget http://xdebug.org/files/xdebug-3.0.2.tgz \
&& tar -xvzf xdebug-3.0.2.tgz \
&& cd xdebug-3.0.2 \
RUN wget http://xdebug.org/files/xdebug-3.0.4.tgz \
&& tar -xvzf xdebug-3.0.4.tgz \
&& cd xdebug-3.0.4 \
&& phpize \
&& ./configure --enable-xdebug \
&& make \
Expand All @@ -32,8 +32,9 @@ RUN sudo bash -c ". /tmp/update-composer.sh" && rm /tmp/update-composer.sh

# gitpod trick to bypass the docker caching mechanism for all lines below this one
# just increment the value each time you want to bypass the cache system
ENV INVALIDATE_CACHE=182
ENV INVALIDATE_CACHE=183

COPY --chown=gitpod:gitpod .gp/conf/apache/apache2.conf /etc/apache2/apache2.conf
COPY --chown=gitpod:gitpod .gp/conf/nginx/nginx.conf /etc/nginx/nginx.conf
COPY --chown=gitpod:gitpod .gp/bash/.bash_aliases /home/gitpod
COPY --chown=gitpod:gitpod .gp/bash/utils.sh /tmp
Expand Down
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ tasks:

vscode:
extensions:
- [email protected].5:xEr6zDqY853IE2HQtLtXPA==
- [email protected].12:e02f0fde2ddd444c182ba531e8b09afd
2 changes: 1 addition & 1 deletion .gp/bash/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#
gls_version() {
local hard version title file
hard="1.1.0"
hard="1.2.0"
title="Gitpod Laravel Starter Framework"
file="$GITPOD_REPO_ROOT"/.gp/CHANGELOG.md
if [[ -f $file ]]; then
Expand Down
19 changes: 15 additions & 4 deletions .gp/bash/init-gitpod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@ fi

# BEGIN: Bootstrapping
if [ ! -d "$GITPOD_REPO_ROOT/vendor" ]; then

# Handle laravel README.md
if [[ $(bash .gp/bash/utils.sh parse_ini_value starter.ini laravel include_readme) == 1 ]]; then
if [[ ! -f "$GITPOD_REPO_ROOT/README_LARAVEL.md" ]]; then
mv /home/gitpod/laravel-starter/README.md "$GITPOD_REPO_ROOT/README_LARAVEL.md"
else
rm /home/gitpod/laravel-starter/README.md
fi
else
rm /home/gitpod/laravel-starter/README.md
fi

# BEGIN: rsync any new Laravel project files from the docker image to the repository
msg="rsync $(php ~/laravel-starter/artisan --version) from ~/laravel-starter to $GITPOD_REPO_ROOT"
log_silent "$msg" && start_spinner "$msg"
Expand All @@ -60,10 +72,9 @@ if [ ! -d "$GITPOD_REPO_ROOT/vendor" ]; then
# END: rsync any new Laravel project files from the docker image to the repository

# Move, rename or merge any project files that need it
[[ -f "LICENSE" && -d ".gp" ]] && mv -f LICENSE .gp/LICENSE
[[ -f "README.md" && -d ".gp" ]] && mv -f README.md .gp/README.md
[[ -f "CHANGELOG.md" && -d ".gp" ]] && mv -f CHANGELOG.md .gp/CHANGELOG.md
mv /home/gitpod/laravel-starter/README.md "$GITPOD_REPO_ROOT/README_LARAVEL.md"
[[ -f "LICENSE" && -d ".gp" && ! -f .gp/LICENSE ]] && mv -f LICENSE .gp/LICENSE
[[ -f "README.md" && -d ".gp" && ! -f .gp/README.md ]] && mv -f README.md .gp/README.md
[[ -f "CHANGELOG.md" && -d ".gp" && ! -f .gp/CHANGELOG.md ]] && mv -f CHANGELOG.md .gp/CHANGELOG.md

# Remove potentially cached phpmyadmin installation if phpmyadmin should not be installed
if [ "$(bash .gp/bash/utils.sh parse_ini_value starter.ini phpmyadmin install)" == 0 ]; then
Expand Down
10 changes: 2 additions & 8 deletions .gp/bash/open-preview.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,8 @@ exit 1

. .gp/bash/spinner.sh

__path=
if [[ -n $1 ]]; then
if [[ ! $1 =~ \/$ ]]; then
__path=/$1/
else
__path=/$1
fi
fi
__path=/$1

__port=$(bash .gp/bash/helpers.sh get_default_server_port)
if [[ $(bash .gp/bash/helpers.sh is_inited) == 0 ]]; then
. .gp/bash/spinner.sh &&
Expand Down
42 changes: 42 additions & 0 deletions .gp/conf/apache/apache2.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Apache httpd v2.4 minimal configuration
# see https://wiki.apache.org/httpd/Minimal_Config for documentation

ServerRoot ${GITPOD_REPO_ROOT}

PidFile ${APACHE_PID_FILE}
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

# Modules as installed/activated via apt-get
IncludeOptional /etc/apache2/mods-enabled/*.load
IncludeOptional /etc/apache2/mods-enabled/*.conf

# BEGIN: Configure hostname and port for server

# Bugfix https://github.com/apolopena/gitpod-laravel-starter/issues/134
ServerName https://localhost

Listen *:8001
# END: Configure hostname and port for server

# Configure Logging
LogFormat "%h %l %u %t \"%r\" %>s %b" common
CustomLog ${APACHE_LOG_DIR}/access.log common
ErrorLog ${APACHE_LOG_DIR}/error.log

# Never change this block
<Directory />
AllowOverride None
Require all denied
</Directory>

# Direcrory and files to be served
DirectoryIndex index.html index.htm index.php
DocumentRoot "${GITPOD_REPO_ROOT}/${APACHE_DOCROOT_IN_REPO}"
<Directory "${GITPOD_REPO_ROOT}/${APACHE_DOCROOT_IN_REPO}">
AllowOverride all
Require all granted
</Directory>

# Include conf installed via apt-get
IncludeOptional /etc/apache2/conf-enabled/*.conf
4 changes: 3 additions & 1 deletion .gp/conf/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ http {
index index.html index.htm index.php;
# Bugfix: https://github.com/apolopena/gitpod-laravel-starter/issues/96
# Rewrite urls that dont have a trailing slash to have a trailing slash thus bypassing redirection.
# Bugfix: https://github.com/apolopena/gitpod-laravel-starter/issues/131
# force rewrite to use https in order to bypass mixed content errors when in an iframe
if (-d $request_filename) {
rewrite [^/]$ $scheme://$http_host$uri/ permanent;
rewrite [^/]$ https://$http_host$uri/ permanent;
}
try_files $uri $uri/ /index.php$is_args$args;
}
Expand Down
9 changes: 8 additions & 1 deletion starter.ini
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ future_release=
version=8.*
# allow_mixed_web
# Valid values are 0 (off) or 1 (on). Only turn this off if you know what you are doing.
# Default value is 1
# Allows for mixed content on the same domain by converting all http requests to https in routes/web.php
# Also forces all web routed urls to use the value set for APP_URL in .env
allow_mixed_web=1
allow_mixed_web=1
# include_readme
# Valid values are 0 (omit LARAVEL_README.md) or 1 (include LARAVEL_README.md).
# Default value is 0
# Allows for the ability to include or omit the LARAVEL_README.md file from your project root
# This directive is ignored if LARAVEL_READEME.md is already in the project root and is in version control
include_readme=0