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

Ease local development, use PHP 7.4, various fixes #962

Merged
merged 59 commits into from
Jan 19, 2022
Merged
Changes from 15 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
9ffcace
Initial commit
arogachev Jan 3, 2022
281da65
Move out vendor and node_modules from shared volume
arogachev Jan 4, 2022
e67fa7b
Bump yii2 and yii2-apidoc versions, reorder for readability
arogachev Jan 5, 2022
0ff7a9e
Expose elasticsearch port
arogachev Jan 5, 2022
20aa083
Add components.elasticsearch to dev config
arogachev Jan 5, 2022
14761a2
Update Dockerfile
arogachev Jan 5, 2022
3bfe298
Add texlive dependency, minor composer adjustments
arogachev Jan 5, 2022
dd51967
Remove commented code and defaults
arogachev Jan 10, 2022
e2f6e26
Fix broken gulp command
arogachev Jan 10, 2022
3b87e47
Freeze yii2-apidoc version, update PHP version, add "sort-packages"
arogachev Jan 10, 2022
184469d
Add nginx and git for generating api
arogachev Jan 10, 2022
8a33a85
Prevent collisions with other Composer installs
arogachev Jan 10, 2022
9b9c0d2
Fix errors for make api-v-2.0
arogachev Jan 10, 2022
8fbf4f2
Remove current composer.lock
arogachev Jan 10, 2022
48c1918
Add nginx-site.conf
arogachev Jan 10, 2022
03da587
Fix generating of Yii 1.1 API docs
arogachev Jan 11, 2022
84a6d57
Adapt make download for custom vendor dir, fix make api-1.0
arogachev Jan 12, 2022
ed8d5bd
Adjust README.md (WIP)
arogachev Jan 12, 2022
4fc916a
Update README.md. Docker now is the main option for local development.
arogachev Jan 12, 2022
a1f5bd3
Add generated Yii 1.0 API docs to version control
arogachev Jan 12, 2022
41f310b
Fix console-local.php
arogachev Jan 12, 2022
a7b1b32
Add JSON files for API 1.0
arogachev Jan 13, 2022
c5f14cf
Fix installation of pageres-cli
arogachev Jan 13, 2022
9307b4d
Fix dir and difference between 1.0 / 1.1
arogachev Jan 13, 2022
9b5b1b3
Move gettint types logic to writeJsonFiles1x
arogachev Jan 13, 2022
f3c5d4e
Use Docker for generating Yii 1.0 API docs as well
arogachev Jan 13, 2022
7161eb6
Better fix for duplicate "en"
arogachev Jan 13, 2022
cde2e01
Replace vendor dir in other places
arogachev Jan 13, 2022
1bed038
Bump yii2-apidoc version
arogachev Jan 14, 2022
59d1698
Add composer.lock
arogachev Jan 14, 2022
39c348b
Minor cleanup, I am active contributor now :)
arogachev Jan 14, 2022
aa7c6ec
Sync vendor and node_modules folder with host
arogachev Jan 14, 2022
3d32ec2
Restore init call, adapt it to work with shared volume
arogachev Jan 14, 2022
a065290
No need for gulp in initial setup
arogachev Jan 14, 2022
72e0267
Require PHP extensions in composer.json
arogachev Jan 14, 2022
4213d73
Restore siteAbsoluteUrl in README.md
arogachev Jan 14, 2022
08a954a
Use https for Github url
arogachev Jan 14, 2022
d98bb3e
Require ext-json in composer.json
arogachev Jan 14, 2022
cb8d487
Use exact version of Github API because of breaking changes
arogachev Jan 17, 2022
9a39f33
Update composer.lock
arogachev Jan 17, 2022
54e5a74
Bump yii2-apidoc version after release
arogachev Jan 17, 2022
7a17081
Merge branch 'master' into ease-local-development
arogachev Jan 18, 2022
99303ef
Reformat code in yml files [skip ci]
arogachev Jan 18, 2022
d158efb
Reformat code in codeception.yml [skip ci]
arogachev Jan 18, 2022
648889f
Adjust PHP and Node.js version
arogachev Jan 18, 2022
4646ad2
Remove yarn
arogachev Jan 18, 2022
8a6ca8c
(Temp) Check contents of "vendor/bower-asset" directory
arogachev Jan 18, 2022
0abb0dc
Get vendor dir form env variable in gulpfile.js
arogachev Jan 18, 2022
3a0a804
Remove Windows block, rsync composer.lock, check scrollup dir
arogachev Jan 18, 2022
fda3454
composer.lock / package-lock.json changes
arogachev Jan 18, 2022
0283d8f
Merge branch 'master' into ease-local-development
arogachev Jan 18, 2022
9038fe4
Strictly freeze "knplabs/github-api" version again
arogachev Jan 18, 2022
dedb2fc
Update composer.lock
arogachev Jan 19, 2022
773cff3
Make use of Redis in Docker environment
arogachev Jan 19, 2022
3931f7e
Merge branch 'master' into ease-local-development
arogachev Jan 19, 2022
08de495
Fix Redis for tests
arogachev Jan 19, 2022
2c4607e
Separate configs by YII_ENV "test"
arogachev Jan 19, 2022
3d641cb
Fix missing class key in config
arogachev Jan 19, 2022
29786ff
Switch to cache session
arogachev Jan 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -40,6 +40,9 @@ phpunit.phar
/web/index.php
/web/.htaccess

# environment-dependent files (miscellaneous)
docker-compose.override.yml

# files automatically generated on dev platform
/web/css/*
/web/js/*
64 changes: 64 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# PHP

FROM php:7.4-fpm

# System packages and dependencies

RUN apt-get update
RUN apt-get install -y texlive-full
RUN apt-get install -y python3-pygments
RUN apt-get install -y libnotify-bin
RUN apt-get install -y git
RUN apt-get install -y nginx

# PHP extensions
# https://github.com/mlocati/docker-php-extension-installer

COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
RUN install-php-extensions gd intl pdo_mysql opcache zip

# Composer

COPY --from=composer:2.2.3 /usr/bin/composer /usr/local/bin/composer

# Node.js
# https://github.com/nvm-sh/nvm

RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
SHELL ["/bin/bash", "--login", "-c"]
RUN command -v nvm
RUN nvm install 13.14.0

# Node.js global packages

RUN npm install -g gulp-cli --loglevel=verbose

# PHP configuration

RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
RUN sed -i 's,^memory_limit =.*$,memory_limit = -1,' "$PHP_INI_DIR/php.ini"

ENV VENDOR_DIR=/code/vendor

# Nginx configuration

COPY nginx-site.conf /etc/nginx/sites-enabled/default

# PHP packages

COPY composer.* /code/
WORKDIR /code
RUN composer config vendor-dir $VENDOR_DIR
RUN composer install
RUN composer config vendor-dir vendor

# Node.js packages

COPY package.json /code
WORKDIR /code
RUN npm install --loglevel=verbose

# Code

ADD . /code/src
WORKDIR /code/src
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -225,7 +225,7 @@ Additionally, `queue/listen` should run as a daemon or `queue/run` as a cronjob.
This section covers notes for deployment on a server, you may not need this for your dev env. OS is assumed to be debian Stretch.

```sh
apt-get install texlive-full git nodejs make
apt-get install texlive-full python3-pygments git nodejs make
```

## Maintenance
85 changes: 38 additions & 47 deletions composer.json
Original file line number Diff line number Diff line change
@@ -5,73 +5,64 @@
"homepage": "https://www.yiiframework.com/",
"type": "project",
"license": "BSD-3-Clause",
"minimum-stability": "stable",
"minimum-stability": "dev",
"require": {
"php": ">=7.0.0",

"yiisoft/yii2": "~2.0.36",

"yiisoft/yii2-apidoc": "~2.1.6",
"cebe/markdown-latex": "^1.1.3@dev",
"cebe/markdown": "~1.0.3",

"yiisoft/yii2-authclient": "~2.2.0",
"yiisoft/yii2-httpclient": "~2.0.0",
"yiisoft/yii2-elasticsearch": "~2.1.0",
"yiisoft/yii2-redis": "~2.0.0",
"yiisoft/yii2-queue": "~2.0.0",
"yiisoft/yii2-swiftmailer": "~2.0.0",
"cebe/yii2-gravatar": "1.1",
"creocoder/yii2-flysystem": "~0.9.0",

"samdark/sitemap": "^2.0",

"knplabs/github-api": "^2.11",
"php-http/curl-client": "^1.7",
"guzzlehttp/psr7": "^1.5",

"scrivo/highlight.php": "~9.18",
"yetanotherape/diff-match-patch": "~1.0.0",

"imagine/imagine": "^0.6.3",

"2amigos/yii2-taggable-behavior": "~1.0.1",
"2amigos/yii2-selectize-widget": "~1.0.1",

"yiisoft/yii2-bootstrap": "~2.0.6",
"yiisoft/yii2-jui": "~2.0.6",
"2amigos/yii2-taggable-behavior": "~1.0.1",
"abraham/twitteroauth": "~0.7.4",
"baibaratsky/yii2-rollbar": "^1.7",
"bower-asset/blueimp-file-upload": "~9.22.0",

"bower-asset/jquery": "2.2.*@stable",
"bower-asset/bootstrap-sass": "3.3.6",
"bower-asset/font-awesome": "^4.5",
"bower-asset/bootstrap-social": "^4.11",
"bower-asset/codemirror": "~5.9.0",
"bower-asset/codemirror-buttons": "~1.0.0",
"bower-asset/font-awesome": "^4.5",
"bower-asset/glidejs": "^2.0",
"bower-asset/jquery": "2.2.*@stable",
"bower-asset/sass-rem": "^1.2",
"bower-asset/scrollup": "^2.4",
"bower-asset/codemirror": "~5.9.0",
"bower-asset/codemirror-buttons": "~1.0.0",
"cebe/markdown": "~1.0.3",
"cebe/markdown-latex": "^1.1.3@dev",
"cebe/yii2-gravatar": "1.1",
"composer/spdx-licenses": "^1.1",
"zendframework/zend-feed": "^2.8",
"abraham/twitteroauth": "~0.7.4",
"baibaratsky/yii2-rollbar": "^1.7",
"himiklab/yii2-recaptcha-widget": "^1.2",
"creocoder/yii2-flysystem": "~0.9.0",
"guzzlehttp/psr7": "^1.5",
"helgesverre/spamprotection": "1.0.1",
"yiisoft/yii2-imagine": "~2.1.0"
"himiklab/yii2-recaptcha-widget": "^1.2",
"imagine/imagine": "^0.6.3",
"knplabs/github-api": "^2.11",
"php": "^7.4",
"php-http/curl-client": "^1.7",
"samdark/sitemap": "^2.0",
"scrivo/highlight.php": "~9.18",
"yetanotherape/diff-match-patch": "~1.0.0",
"yiisoft/yii2": "~2.0.44",
"yiisoft/yii2-apidoc": "dev-master#1240db129e7196ab10af23948655ea2da089d20d",
"yiisoft/yii2-authclient": "~2.2.0",
"yiisoft/yii2-bootstrap": "~2.0.6",
"yiisoft/yii2-elasticsearch": "~2.1.0",
"yiisoft/yii2-httpclient": "~2.0.0",
"yiisoft/yii2-imagine": "~2.1.0",
"yiisoft/yii2-jui": "~2.0.6",
"yiisoft/yii2-queue": "~2.0.0",
"yiisoft/yii2-redis": "~2.0.0",
"yiisoft/yii2-swiftmailer": "~2.0.0",
"zendframework/zend-feed": "^2.8"
},
"require-dev": {
"codeception/base": "^2.2.3",
"yiisoft/yii2-debug": "~2.1.0",
"yiisoft/yii2-gii": "~2.0.0",
"yiisoft/yii2-faker": "~2.0.0",
"yiisoft/yii2-shell": "~2.0.0",
"codeception/base": "^2.2.3"
"yiisoft/yii2-gii": "~2.0.0",
"yiisoft/yii2-shell": "~2.0.0"
},
"config": {
"process-timeout": 1800,
"fxp-asset": {
"enabled": false
},
"platform": {"php": "7.0"}
"platform": {"php": "7.4"},
"sort-packages": true
},
"repositories": [
{
Loading