Commit f3394155 authored by Tobias Munk's avatar Tobias Munk

updated build & deps

parent 556abee9
.git
.vagrant
.env
data
vendor
......
FROM phundament/php:5.6-cli-4.0.0-dev
# Remove installation source
RUN rm -rf /app
RUN rm -rf /app-src
# Prepare composer
......@@ -13,4 +14,4 @@ ADD ./composer.json /app/composer.json
RUN /usr/local/bin/composer install --prefer-dist --optimize-autoloader
# Add application code
ADD . /app
ADD src /app/src
......@@ -17,43 +17,57 @@ Make the application stack
> For alternative installation methods see the [docs](docs/20-installation-composer.md).
Find the port for the application nginx service
docker-compose ps
And open the application in your browser.
Configuration
-------------
### Environment - `docker-compose.yml`
- **VIRTUAL_HOST** : `~^myapp\.` - Virtual-host configuration for reverse proxy, adjust the virtual host parameter
- `VIRTUAL_HOST` `~^myapp\.` - Virtual-host configuration for reverse proxy, adjust the virtual host parameter
for web application, we'll use it later to easily access the web-server through a wildcard DNS.
### Environment defaults - `.env`
- **APP_ADMIN_EMAIL**: e-mail address of application admin user
- **APP_ADMIN_PASSWORD**: password of application admin user
- **APP_ASSET_FORCE_PUBLISH**: force asset publishing after any changes to asset files
- **APP_COOKIE_VALIDATION_KEY**: unique and random string to prevent XSS
- **APP_ID**: unique application and container identifier (only lowercase letters and number)
- **APP_MIGRATION_LOOKUP** : comma separated list of Yii aliases to look for database migrations, eg. `@app/migrations/data`
- **APP_NAME**: display name of the application
- **APP_PRETTY_URLS**: enable or disable nice URLs, allowed values `1` (yes) or `0` (no)
- **APP_SUPPORT_EMAIL**: e-mail address for the application eg. `support@myapp.local`
Identifier
- `APP_NS` namespace for the application, used i.e. for Docker image tags *[a-z0-9]*
- `APP_ID` unique application and container identifier *[a-z0-9]*
- `APP_NAME` display name of the application
Application
- `APP_MIGRATION_LOOKUP` comma separated list of Yii aliases to look for database migrations, eg. `@app/migrations/data`
- `APP_ADMIN_EMAIL` e-mail address of application admin user
- `APP_ADMIN_PASSWORD` password of application admin user
- `APP_SUPPORT_EMAIL` e-mail address for the application eg. `support@myapp.local`
- `APP_COOKIE_VALIDATION_KEY` unique and random string to prevent XSS
- `APP_PRETTY_URLS` enable or disable nice URLs, allowed values `1` (yes) or `0` (no)
*Application development settings*
- `APP_ASSET_FORCE_PUBLISH` force asset publishing after any changes to asset files. **Note!** This may degrade performance or cause permission issues, depending on your setup.
Framework
- **YII_DEBUG**: wheter to enable more verbose application output, eg. on PHP exceptions.
- **YII_ENV**: Yii application mode, allowed values `dev`, `prod` or `test`
- **YII_TRACE_LEVEL** amount of caller levels to display for logging.
- `YII_DEBUG` wheter to enable more verbose application output, eg. on PHP exceptions.
- `YII_ENV` Yii application mode, allowed values `dev`, `prod` or `test`
- `YII_TRACE_LEVEL` amount of caller levels to display for logging.
Database variables
Database
- **DB_ENV_MYSQL_DATABASE**: database name
- **DB_ENV_MYSQL_PASSWORD**: database password
- **DB_ENV_MYSQL_USER**: database user
- **DB_PORT_3306_TCP_ADDR**: database hostname
- **DB_PORT_3306_TCP_PORT**: database port
- `DB_ENV_MYSQL_DATABASE` database name
- `DB_ENV_MYSQL_PASSWORD` database password
- `DB_ENV_MYSQL_USER` database user
- `DB_PORT_3306_TCP_ADDR` database hostname
- `DB_PORT_3306_TCP_PORT` database port
### Application settings - `config/main.php`
### PHP Application settings - `config/main.php`
For details of available application configuration, please refer to the Yii 2.0 Framework Definitive Guide.
......
......@@ -11,7 +11,7 @@
"boilerplate",
"vagrant",
"docker",
"fig",
"docker-compose",
"12factor",
"dotenv"
],
......@@ -32,12 +32,12 @@
"minimum-stability": "stable",
"require": {
"dmstr/yii2-cms-metapackage": "dev-master",
"sammaye/yii2-audittrail":"dev-master",
"vlucas/phpdotenv": "1.1.*",
"yiisoft/yii2": "2.0.*",
"yiisoft/yii2-composer": "@stable"
},
"require-dev": {
"dmstr/yii2-cms-dev-metapackage": "dev-master",
"yiisoft/yii2-debug": "@stable"
},
"scripts": {
......
This diff is collapsed.
......@@ -45,6 +45,7 @@ appnginx:
# host-volume for local development
volumes:
- '.:/app'
- 'build/nginx/run.sh:/root/run.sh'
ports:
- '80'
environment:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment