Skip to content

Commit 126ebd4

Browse files
committed
Merge branch 'master' into phundament-as-dna-code-generator
Conflicts: .env-dist README.md composer.json composer.lock config/env.php
2 parents 1b58e54 + 813a3c4 commit 126ebd4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1544
-928
lines changed

.env-dist

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ YII_ENV=prod
77
# Application
88
# -----------
99

10+
APP_ID=myapp
1011
APP_NAME=$SITENAME
1112
APP_ADMIN_EMAIL=$SUPPORT_EMAIL
1213
APP_ADMIN_PASSWORD=$YII_ADMIN_PASSWORD

.travis.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@ php:
44
- 5.4
55
- 5.5
66
- 5.6
7-
# - hhvm
7+
- hhvm
88

9-
# run build against PHP 5.6 and hhvm but allow them to fail
9+
# run build against hhvm but allow them to fail
1010
# http://docs.travis-ci.com/user/build-configuration/#Rows-That-are-Allowed-To-Fail
1111
matrix:
1212
allow_failures:
1313
- php: hhvm
14-
- php: 5.6
1514

1615
env:
1716
global:

CHANGELOG.md

+18-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,24 @@ CHANGELOG
33

44
Phundament 4
55

6-
4.0.0-beta9 (in progress)
7-
-------------------------
6+
4.0.0-dev
7+
---------
8+
9+
- [UPD] updated default configuration (schmunk42)
10+
11+
4.0.0-beta11
12+
------------
13+
14+
- [ENH] Refactored Docker setup (schmunk42)
15+
- [UPD] Template views and style (schmunk42)
16+
17+
4.0.0-beta10
18+
------------
19+
20+
- build fixes
21+
22+
4.0.0-beta9
23+
-----------
824

925
- [FIX] Vagrant shared folder issues (schmunk42)
1026

Dockerfile

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
FROM phundament/app:development
22

3+
# Prepare composer
4+
# /!\ Note: Please add your own API token to config.json; Phundament comes with a public token for your convenince, which may hit a rate limit
5+
ADD ./build/composer/config.json /root/.composer/config.json
6+
7+
# Install packages first
38
ADD ./composer.lock /app/composer.lock
49
ADD ./composer.json /app/composer.json
5-
RUN /usr/local/bin/composer install --prefer-dist --dev
6-
ADD . /app
10+
RUN /usr/local/bin/composer install --prefer-dist --dev --optimize-autoloader
711

12+
# Add application code
13+
ADD . /app
814

9-
# Uncomment to enable password protection (demo/demo) for app server
10-
#ADD docs/examples/docker-staging/default /etc/nginx/sites-available/default
11-
#ADD docs/examples/docker-staging/.htpasswd /etc/nginx/.htpasswd
15+
# Easy PaaS setup
16+
ENV DB_ENV_MYSQL_DATABASE dev-myapp

Dockerfile-production

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM phundament/app:production
2+
3+
# Prepare composer
4+
# /!\ Note: Please add your own API token to config.json; Phundament comes with a public token for your convenince, which may hit a rate limit
5+
ADD ./build/composer/config.json /root/.composer/config.json
6+
7+
# Install packages first (non-development only)
8+
ADD ./composer.lock /app/composer.lock
9+
ADD ./composer.json /app/composer.json
10+
RUN /usr/local/bin/composer install --prefer-dist --no-dev --optimize-autoloader
11+
12+
# Add application code
13+
ADD . /app
14+
15+
16+
# Easy PaaS setup
17+
# ---------------
18+
ENV DB_ENV_MYSQL_DATABASE prod-myapp
19+
ENV APP_NAME My Application
20+
ENV APP_ADMIN_PASSWORD=YOU_HAVE_TO_CHANGE_THIS
21+
22+
23+
# Staging
24+
# -------
25+
# Uncomment to enable password protection (demo/demo) for app server
26+
#ADD docs/examples/docker-staging/default /etc/nginx/sites-available/default
27+
#ADD docs/examples/docker-staging/.htpasswd /etc/nginx/.htpasswd

Vagrantfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
1515
config.vm.define "rproxy" do |rproxy|
1616
rproxy.vm.network "forwarded_port", guest: 80, host: 80
1717
rproxy.vm.provider "docker" do |docker|
18-
docker.vagrant_vagrantfile = "build/dockerhost/Vagrantfile"
18+
docker.vagrant_vagrantfile = "build/vagrant-dockerhost/Vagrantfile"
1919
docker.name = "rproxy"
2020
docker.image = "jwilder/nginx-proxy"
2121
docker.volumes = ["/var/run/docker.sock:/tmp/docker.sock"]
@@ -25,7 +25,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
2525
config.vm.define "db" do |db|
2626
db.vm.network "forwarded_port", guest: 3306, host: 3306, auto_correct: true
2727
db.vm.provider "docker" do |docker|
28-
docker.vagrant_vagrantfile = "build/dockerhost/Vagrantfile"
28+
docker.vagrant_vagrantfile = "build/vagrant-dockerhost/Vagrantfile"
2929
docker.name = "db"
3030
docker.image = "mysql"
3131
docker.env = {
@@ -41,7 +41,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
4141
web.vm.network "forwarded_port", guest: 80, host: 10080, auto_correct: true
4242
web.vm.synced_folder "./", "/app"
4343
web.vm.provider "docker" do |docker|
44-
docker.vagrant_vagrantfile = "build/dockerhost/Vagrantfile"
44+
docker.vagrant_vagrantfile = "build/vagrant-dockerhost/Vagrantfile"
4545
docker.build_dir = "."
4646
docker.link("rproxy:RPROXY")
4747
docker.link("db:DB")

assets/AppAsset.php

+15-12
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
namespace app\assets;
99

10+
use yii\helpers\FileHelper;
1011
use yii\web\AssetBundle;
1112

1213
/**
@@ -31,20 +32,22 @@ class AppAsset extends AssetBundle
3132
'yii\web\YiiAsset',
3233
];
3334

34-
public function init(){
35+
public function init()
36+
{
3537
parent::init();
3638
\Yii::$app->getAssetManager()->bundles['yii\bootstrap\BootstrapAsset'] = false;
37-
// "forceCopy" for this bundle only
38-
/*if (YII_ENV_DEV) {
39-
touch(\Yii::getAlias($this->sourcePath));
40-
}*/
41-
}
42-
43-
public function registerAssetFiles($view) {
44-
#$view->getAssetManager()->bundles['yii\bootstrap\BootstrapAsset'] = ['css'=>false];
45-
#var_dump($view->getAssetManager()->bundles);exit;
46-
parent::registerAssetFiles($view);
47-
#$view->getAssetManager()->bundles['yii\bootstrap\BootstrapAsset'] = false;
4839

40+
// /!\ CSS/LESS development only setting /!\
41+
// Touch the asset folder with the highest mtime of all contained files
42+
// This will create a new folder in web/assets for every change and request
43+
// made to the app assets.
44+
if (YII_ENV_DEV) {
45+
$files = FileHelper::findFiles(\Yii::getAlias($this->sourcePath));
46+
$mtimes = [];
47+
foreach ($files AS $file) {
48+
$mtimes[] = filemtime($file);
49+
}
50+
touch(\Yii::getAlias($this->sourcePath), max($mtimes));
51+
}
4952
}
5053
}

assets/less/app.less

+13-36
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
@import "bootstrap";
44

55
/* Custom Variables */
6-
@brand-primary: #222;
7-
@border-radius-base: 2px;
8-
@border-radius-large: 4px;
9-
@border-radius-small: 1px;
10-
@font-size-base: 18px;
6+
//@brand-primary: #484748;
7+
@border-radius-base: 1px;
8+
@border-radius-large: 3px;
9+
@border-radius-small: 0px;
10+
@font-size-base: 14px;
1111

1212
/* Custom CSS for Bootstrap 3.x */
1313
html,
@@ -20,9 +20,9 @@ body {
2020
body {
2121
margin-top: 50px;
2222
background: @gray-lighter;
23-
2423
}
2524

25+
2626
.wrap {
2727
background: white;
2828
}
@@ -84,17 +84,17 @@ pre code {
8484
}
8585

8686
.header {
87-
height: 80%;
88-
background: @brand-primary url('http://pub.phundament.com/unsplash.com/toddquackenbush/dufer-collateral.jpg') no-repeat center center;
87+
height: 20%;
88+
background: @brand-primary no-repeat center center;
8989
@media (max-width: 767px) {
90-
background: @brand-primary url('http://pub.phundament.com/unsplash.com/toddquackenbush/dufer-collateral-low.jpg') no-repeat center center;
90+
background: @brand-primary no-repeat center center;
9191
}
9292
background-size: cover;
9393
text-align: center;
9494
h1 {
95-
font-size: 140px;
95+
font-size: 3em;
9696
@media (max-width: @screen-md) {
97-
font-size: 100px;
97+
font-size: 2.5em;
9898
}
9999
@media (max-width: 767px) {
100100
font-size: 44px;
@@ -135,8 +135,8 @@ pre code {
135135
.vert {
136136
vertical-align: middle;
137137
width: 100%;
138-
padding-top: 8%;
139-
padding-bottom: 10%;
138+
padding-top: 1%;
139+
padding-bottom: 3%;
140140
}
141141

142142
.blurb {
@@ -186,29 +186,6 @@ pre code {
186186
}
187187
}
188188

189-
.docs {
190-
blockquote {
191-
font-size: 1em;
192-
color: @gray-light;
193-
}
194-
A {
195-
text-decoration: underline;
196-
}
197-
.toc {
198-
h1 {
199-
font-size: 1.2em;
200-
}
201-
h2, h3, h4, h5 {
202-
font-size: 1em;
203-
color: @gray
204-
}
205-
ul {
206-
padding-left: 20px;
207-
}
208-
}
209-
210-
}
211-
212189
footer {
213190
padding: 30px 0;
214191
color: @gray-light;

assets/less/bootstrap.less

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
@bootstrap-path: "../../vendor/bower/bootstrap/less";
22

3+
34
// Core variables and mixins
45
@import "@{bootstrap-path}/variables.less";
56
@import "@{bootstrap-path}/mixins.less";

0 commit comments

Comments
 (0)