Skip to content
This repository was archived by the owner on Mar 15, 2019. It is now read-only.

Commit 9a4b43a

Browse files
author
Julien Neuhart
authored
updating kickoff-docker-php for Orbit v3.0.0 (#53)
1 parent d9815e3 commit 9a4b43a

30 files changed

+256
-311
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ before_install:
1414
- curl -L https://github.com/docker/compose/releases/download/1.14.0/docker-compose-`uname -s`-`uname -m` > docker-compose
1515
- chmod +x docker-compose
1616
- sudo mv docker-compose /usr/local/bin
17-
- wget https://github.com/gulien/orbit/releases/download/v2.0.0/orbit_Linux_x86_64.tar.gz && tar -xzf orbit*.tar.gz orbit && rm -f orbit*.tar.gz
17+
- wget https://github.com/gulien/orbit/releases/download/v3.0.0/orbit_Linux_x86_64.tar.gz && tar -xzf orbit*.tar.gz orbit && rm -f orbit*.tar.gz
1818
- sudo mv ./orbit /usr/local/bin && chmod +x /usr/local/bin/orbit
1919

2020
script:

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017 Julien Neuhart
3+
Copyright (c) 2018 Julien Neuhart
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<h3 align="center">kickoff-docker-php</h3>
55
<p align="center">A complete stack for your PHP project powered by Docker</p>
66
<p align="center">
7-
<a href="https://github.com/thecodingmachine/kickoff-docker-php/tree/v2.4.0"><img src="https://img.shields.io/badge/stable-v2.4.0-green.svg" alt="Stable release: v2.4.0"></a>
7+
<a href="https://github.com/thecodingmachine/kickoff-docker-php/tree/v2.5.0"><img src="https://img.shields.io/badge/stable-v2.5.0-green.svg" alt="Stable release: v2.5.0"></a>
88
<a href="https://github.com/thecodingmachine/kickoff-docker-php/tree/master"><img src="https://img.shields.io/badge/unstable-master-orange.svg" alt="Unstable release: master"></a>
99
<a href="https://travis-ci.org/thecodingmachine/kickoff-docker-php"><img src="https://img.shields.io/travis/thecodingmachine/kickoff-docker-php.svg?label=Travis+CI" alt="Travis CI"></a>
1010
</p>
@@ -27,7 +27,7 @@ following goals in mind:
2727
* [Features](#features)
2828
* [Install](#install)
2929
* [Quick start](#quick-start)
30-
* [Orbit commands](#orbit-commands)
30+
* [Orbit tasks](#orbit-tasks)
3131
* [Project structure](#project-structure)
3232
* [Configuration](#configuration)
3333
* [Modules](#modules)
@@ -60,7 +60,7 @@ On Linux, you also have to install [Docker compose](https://docs.docker.com/comp
6060
come with by default. Also add your current user to the `docker` group and don't forget to logout/login from your current
6161
session.
6262

63-
Then download and install [Orbit](https://github.com/gulien/orbit) (**>= 2.0.0**), a tool for generating files from templates and
63+
Then download and install [Orbit](https://github.com/gulien/orbit) (**>= 3.0.0**), a tool for generating files from templates and
6464
running commands.
6565

6666
You may now fork this project and clone it or download the latest release from the [releases page](../../releases).
@@ -121,21 +121,21 @@ The installation might take some time, so go for a coffee break! :coffee:
121121
Once everything has been installed, open your favorite web browser and copy / paste https://www.your-virtualhost.local
122122
and check if everything is OK!
123123

124-
## Orbit commands
124+
## Orbit tasks
125125

126126
**Note:** You can use the `-d` flag to have a more detailed output.
127127

128-
### Main commands
128+
### Main tasks
129129

130130
| Command | Description |
131131
|------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|
132-
| `orbit run` | Displays available Orbit commands. |
132+
| `orbit run` | Displays available tasks. |
133133
| `orbit run kickoff` | Generates all configuration files, builds the NGINX and PHP-FPM images and starts the containers. It's a combo of `build`, `proxy-up` and `up` commands. |
134134
| `orbit run shutdown` | Stops all containers. It's a combo of `down` and `proxy-down` commands. |
135135
| `orbit run workspace` | Connects through ash to the PHP-FPM container. This is where you're able to run useful commands like `composer` and `yarn`. |
136136
| `orbit run mysql-cli` | Opens the MySQL cli as `root`. On environments <> `local`, it will ask you the MySQL `root` password. |
137137

138-
### Others commands
138+
### Others tasks
139139

140140
**Note:** you should not use them, unless you know what you're doing!
141141

config/orbit/messages.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

config/orbit/orbit-build.yml

Lines changed: 34 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# |--------------------------------------------------------------------------
2-
# | Orbit build commands
2+
# | Build tasks
33
# |--------------------------------------------------------------------------
44
# |
5-
# | This file describes the build commands of your project.
6-
# | Feel free to add your own commands!
5+
# | This file describes the build tasks of your project.
6+
# | Feel free to add your own tasks!
77
# |
88
# | https://github.com/gulien/orbit/
99
# |
1010

11-
commands:
11+
tasks:
1212

1313
# |--------------------------------------------------------------------------
1414
# | orbit run docker-sync-build
@@ -19,11 +19,9 @@ commands:
1919

2020
- use: docker-sync-build
2121
run:
22-
{{ if eq "true" .EnvFiles.Config.ENABLE_DOCKER_SYNC }}
23-
- orbit generate -t docker-sync.blueprint.yml -o docker-sync.yml -v Project,config/project.yml -e Config,config/.env {{ if debug }}-d{{ end }}
24-
- orbit run script-fix-permissions-docker-sync -c config/orbit/orbit-scripts.yml -v Project,config/project.yml;Modules,config/modules.yml -e Config,config/.env {{ if debug }}-d{{ end }}
25-
{{ else if eq "windows" os }}
26-
- cmd.exe /c echo Skipping Docker Sync configuration file generation ...
22+
{{ if eq "true" .Orbit.EnvFile.ENABLE_DOCKER_SYNC }}
23+
- orbit generate -f docker-sync.blueprint.yml -o docker-sync.yml {{ if debug }}-d{{ end }}
24+
- orbit run script-fix-permissions-docker-sync -f config/orbit/orbit-scripts.yml {{ if debug }}-d{{ end }}
2725
{{ else }}
2826
- echo Skipping Docker Sync configuration file generation ...
2927
{{ end }}
@@ -37,7 +35,7 @@ commands:
3735

3836
- use: toolbox-build
3937
run:
40-
- orbit generate -t modules/toolbox/docker-compose.blueprint.yml -o modules/toolbox/docker-compose.yml -v Project,config/project.yml;Modules,config/modules.yml -e Config,config/.env {{ if debug }}-d{{ end }}
38+
- orbit generate -f modules/toolbox/docker-compose.blueprint.yml -o modules/toolbox/docker-compose.yml {{ if debug }}-d{{ end }}
4139

4240
# |--------------------------------------------------------------------------
4341
# | orbit run traefik-build
@@ -48,10 +46,10 @@ commands:
4846

4947
- use: traefik-build
5048
run:
51-
- orbit run script-traefik-self-signed-certificate -c config/orbit/orbit-scripts.yml -v Project,config/project.yml;Modules,config/modules.yml -e Config,config/.env {{ if debug }}-d{{ end }}
52-
- orbit run script-traefik-htdigest -c config/orbit/orbit-scripts.yml -v Project,config/project.yml;Modules,config/modules.yml -e Config,config/.env {{ if debug }}-d{{ end }}
53-
- orbit generate -t modules/traefik/traefik.blueprint.toml -o modules/traefik/traefik.toml -v Project,config/project.yml -e Config,config/.env {{ if debug }}-d{{ end }}
54-
- orbit generate -t modules/traefik/docker-compose.blueprint.yml -o modules/traefik/docker-compose.yml -v Project,config/project.yml;Modules,config/modules.yml -e Config,config/.env {{ if debug }}-d{{ end }}
49+
- orbit run script-traefik-self-signed-certificate -f config/orbit/orbit-scripts.yml {{ if debug }}-d{{ end }}
50+
- orbit run script-traefik-htdigest -f config/orbit/orbit-scripts.yml {{ if debug }}-d{{ end }}
51+
- orbit generate -f modules/traefik/traefik.blueprint.toml -o modules/traefik/traefik.toml {{ if debug }}-d{{ end }}
52+
- orbit generate -f modules/traefik/docker-compose.blueprint.yml -o modules/traefik/docker-compose.yml {{ if debug }}-d{{ end }}
5553

5654
# |--------------------------------------------------------------------------
5755
# | orbit run graylog-build
@@ -62,12 +60,10 @@ commands:
6260

6361
- use: graylog-build
6462
run:
65-
{{ if eq true .Values.Modules.graylog.enable }}
66-
- orbit generate -t modules/graylog/docker-compose.blueprint.yml -o modules/graylog/docker-compose.yml -v Project,config/project.yml;Modules,config/modules.yml -e Config,config/.env {{ if debug }}-d{{ end }}
67-
- orbit generate -t modules/graylog/udp-input.blueprint.json -o modules/graylog/udp-input.json -e Config,config/.env {{ if debug }}-d{{ end }}
68-
- orbit run script-graylog-secrets -c config/orbit/orbit-scripts.yml -v Project,config/project.yml;Modules,config/modules.yml -e Config,config/.env {{ if debug }}-d{{ end }}
69-
{{ else if eq "windows" os }}
70-
- cmd.exe /c echo Skipping Graylog configuration files generation ...
63+
{{ if eq true .Orbit.Modules.graylog.enable }}
64+
- orbit generate -f modules/graylog/docker-compose.blueprint.yml -o modules/graylog/docker-compose.yml {{ if debug }}-d{{ end }}
65+
- orbit generate -f modules/graylog/udp-input.blueprint.json -o modules/graylog/udp-input.json {{ if debug }}-d{{ end }}
66+
- orbit run script-graylog-secrets -f config/orbit/orbit-scripts.yml {{ if debug }}-d{{ end }}
7167
{{ else }}
7268
- echo Skipping Graylog configuration files generation ...
7369
{{ end }}
@@ -76,16 +72,16 @@ commands:
7672
# | orbit run php-fpm-build
7773
# |--------------------------------------------------------------------------
7874
# |
79-
# | Generates PHP-FPM configuration files and builds the image.
75+
# | Generates PHP-FPM configuration files.
8076
# |
8177

8278
- use: php-fpm-build
8379
run:
84-
- orbit generate -t modules/php-fpm/docker-compose.blueprint.yml -o modules/php-fpm/docker-compose.yml -v Project,config/project.yml;Modules,config/modules.yml -e Config,config/.env {{ if debug }}-d{{ end }}
85-
- orbit run script-fix-permissions-php-fpm -c config/orbit/orbit-scripts.yml -v Project,config/project.yml;Modules,config/modules.yml -e Config,config/.env {{ if debug }}-d{{ end }}
86-
- orbit generate -t modules/php-fpm/conf.d/memory-limit.blueprint.ini -o modules/php-fpm/conf.d/memory-limit.ini -e Config,config/.env {{ if debug }}-d{{ end }}
87-
- orbit generate -t modules/php-fpm/php-fpm.d/memory-limit.blueprint.conf -o modules/php-fpm/php-fpm.d/memory-limit.conf -e Config,config/.env {{ if debug }}-d{{ end }}
88-
- orbit generate -t modules/php-fpm/php-fpm.d/security.blueprint.conf -o modules/php-fpm/php-fpm.d/security.conf -e Config,config/.env {{ if debug }}-d{{ end }}
80+
- orbit generate -f modules/php-fpm/docker-compose.blueprint.yml -o modules/php-fpm/docker-compose.yml {{ if debug }}-d{{ end }}
81+
- orbit run script-fix-permissions-php-fpm -f config/orbit/orbit-scripts.yml {{ if debug }}-d{{ end }}
82+
- orbit generate -f modules/php-fpm/conf.d/memory-limit.blueprint.ini -o modules/php-fpm/conf.d/memory-limit.ini {{ if debug }}-d{{ end }}
83+
- orbit generate -f modules/php-fpm/php-fpm.d/memory-limit.blueprint.conf -o modules/php-fpm/php-fpm.d/memory-limit.conf {{ if debug }}-d{{ end }}
84+
- orbit generate -f modules/php-fpm/php-fpm.d/security.blueprint.conf -o modules/php-fpm/php-fpm.d/security.conf {{ if debug }}-d{{ end }}
8985

9086
# |--------------------------------------------------------------------------
9187
# | orbit run nginx-build
@@ -96,9 +92,9 @@ commands:
9692

9793
- use: nginx-build
9894
run:
99-
- orbit generate -t modules/nginx/docker-compose.blueprint.yml -o modules/nginx/docker-compose.yml -v Project,config/project.yml;Modules,config/modules.yml -e Config,config/.env {{ if debug }}-d{{ end }}
100-
- orbit run script-fix-permissions-nginx -c config/orbit/orbit-scripts.yml -v Project,config/project.yml;Modules,config/modules.yml -e Config,config/.env {{ if debug }}-d{{ end }}
101-
- docker-compose -p {{ .EnvFiles.Config.ENV }}{{ .Values.Project.name }} -f modules/nginx/docker-compose.yml build
95+
- orbit generate -f modules/nginx/docker-compose.blueprint.yml -o modules/nginx/docker-compose.yml {{ if debug }}-d{{ end }}
96+
- orbit run script-fix-permissions-nginx -f config/orbit/orbit-scripts.yml {{ if debug }}-d{{ end }}
97+
- docker-compose -p {{ .Orbit.EnvFile.ENV }}{{ .Orbit.Project.name }} -f modules/nginx/docker-compose.yml build
10298

10399
# |--------------------------------------------------------------------------
104100
# | orbit run mysql-build
@@ -109,13 +105,11 @@ commands:
109105

110106
- use: mysql-build
111107
run:
112-
{{ if eq true .Values.Modules.mysql.enable }}
113-
- orbit generate -t modules/mysql/docker-compose.blueprint.yml -o modules/mysql/docker-compose.yml -v Project,config/project.yml;Modules,config/modules.yml -e Config,config/.env {{ if debug }}-d{{ end }}
114-
- orbit generate -t modules/mysql/docker-entrypoint-initdb.d/databases.blueprint.sql -o modules/mysql/docker-entrypoint-initdb.d/databases.sql -v Modules,config/modules.yml -e Config,config/.env {{ if debug }}-d{{ end }}
115-
- orbit generate -t modules/mysql/secrets/mysql_password.blueprint.txt -o modules/mysql/secrets/mysql_password.txt -e Config,config/.env {{ if debug }}-d{{ end }}
116-
- orbit generate -t modules/mysql/secrets/mysql_root_password.blueprint.txt -o modules/mysql/secrets/mysql_root_password.txt -e Config,config/.env {{ if debug }}-d{{ end }}
117-
{{ else if eq "windows" os }}
118-
- cmd.exe /c echo Skipping MySQL configuration files generation ...
108+
{{ if eq true .Orbit.Modules.mysql.enable }}
109+
- orbit generate -f modules/mysql/docker-compose.blueprint.yml -o modules/mysql/docker-compose.yml {{ if debug }}-d{{ end }}
110+
- orbit generate -f modules/mysql/docker-entrypoint-initdb.d/databases.blueprint.sql -o modules/mysql/docker-entrypoint-initdb.d/databases.sql {{ if debug }}-d{{ end }}
111+
- orbit generate -f modules/mysql/secrets/mysql_password.blueprint.txt -o modules/mysql/secrets/mysql_password.txt {{ if debug }}-d{{ end }}
112+
- orbit generate -f modules/mysql/secrets/mysql_root_password.blueprint.txt -o modules/mysql/secrets/mysql_root_password.txt {{ if debug }}-d{{ end }}
119113
{{ else }}
120114
- echo Skipping MySQL configuration files generation ...
121115
{{ end }}
@@ -129,10 +123,8 @@ commands:
129123

130124
- use: redis-build
131125
run:
132-
{{ if eq true .Values.Modules.redis.enable }}
133-
- orbit generate -t modules/redis/docker-compose.blueprint.yml -o modules/redis/docker-compose.yml -v Project,config/project.yml;Modules,config/modules.yml -e Config,config/.env {{ if debug }}-d{{ end }}
134-
{{ else if eq "windows" os }}
135-
- cmd.exe /c echo Skipping Redis configuration files generation ...
126+
{{ if eq true .Orbit.Modules.redis.enable }}
127+
- orbit generate -f modules/redis/docker-compose.blueprint.yml -o modules/redis/docker-compose.yml {{ if debug }}-d{{ end }}
136128
{{ else }}
137129
- echo Skipping Redis configuration files generation ...
138130
{{ end }}
@@ -146,10 +138,8 @@ commands:
146138

147139
- use: rabbitmq-build
148140
run:
149-
{{ if eq true .Values.Modules.rabbitmq.enable }}
150-
- orbit generate -t modules/rabbitmq/docker-compose.blueprint.yml -o modules/rabbitmq/docker-compose.yml -v Project,config/project.yml;Modules,config/modules.yml -e Config,config/.env {{ if debug }}-d{{ end }}
151-
{{ else if eq "windows" os }}
152-
- cmd.exe /c echo Skipping RabbitMQ configuration files generation ...
141+
{{ if eq true .Orbit.Modules.rabbitmq.enable }}
142+
- orbit generate -f modules/rabbitmq/docker-compose.blueprint.yml -o modules/rabbitmq/docker-compose.yml {{ if debug }}-d{{ end }}
153143
{{ else }}
154144
- echo Skipping RabbitMQ configuration files generation ...
155145
{{ end }}

config/orbit/orbit-commands.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# |--------------------------------------------------------------------------
2-
# | Orbit commands
2+
# | Tasks for commands
33
# |--------------------------------------------------------------------------
44
# |
55
# | This file describes the commands from the containers of your project.
6-
# | Feel free to add your own commands!
6+
# | Feel free to add your own tasks!
77
# |
88
# | https://github.com/gulien/orbit/
99
# |
1010

11-
commands:
11+
tasks:
1212

1313
# |--------------------------------------------------------------------------
1414
# | orbit run command-workspace
@@ -19,7 +19,7 @@ commands:
1919

2020
- use: command-workspace
2121
run:
22-
- docker exec --user www-data -ti {{ .EnvFiles.Config.ENV }}-{{ .Values.Project.name }}-php-fpm ash
22+
- docker exec --user www-data -ti {{ .Orbit.EnvFile.ENV }}-{{ .Orbit.Project.name }}-php-fpm ash
2323

2424
# |--------------------------------------------------------------------------
2525
# | orbit run command-mysql-cli
@@ -32,10 +32,8 @@ commands:
3232

3333
- use: command-mysql-cli
3434
run:
35-
{{ if eq true .Values.Modules.mysql.enable }}
36-
- docker exec -ti {{ .EnvFiles.Config.ENV }}-{{ .Values.Project.name }}-mysql mysql -uroot -p{{ if eq "local" .EnvFiles.Config.ENV }}{{ .EnvFiles.Config.MYSQL_ROOT_PASSWORD }}{{ end }}
37-
{{ else if eq "windows" os }}
38-
- cmd.exe /c echo MySQL is not enable!
35+
{{ if eq true .Orbit.Modules.mysql.enable }}
36+
- docker exec -ti {{ .Orbit.EnvFile.ENV }}-{{ .Orbit.Project.name }}-mysql mysql -uroot -p{{ if eq "local" .Orbit.EnvFile.ENV }}{{ .Orbit.EnvFile.MYSQL_ROOT_PASSWORD }}{{ end }}
3937
{{ else }}
4038
- echo MySQL is not enable!
4139
{{ end }}

0 commit comments

Comments
 (0)