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

Commit bf7c052

Browse files
author
Julien Neuhart
authored
v2.0.0 Release Candidate 1 (#29)
1 parent 48ba9d5 commit bf7c052

29 files changed

+337
-320
lines changed
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ sedi()
99
}
1010

1111
# permissions issues workaround for Linux
12-
if [ "$1" == "toolbox" ]; then
13-
sedi "s/\${UID}/$(id -u)/g" ${ROOT}/.docker/docker-compose-toolbox.yml;
14-
else
15-
sedi "s/\${UID}/$(id -u)/g" ${ROOT}/.docker/docker-compose.yml;
16-
fi;
12+
sedi "s/\${UID}/$(id -u)/g" ${ROOT}/.docker/docker-compose.yml;
13+
sedi "s/\${GID}/$(id -g)/g" ${ROOT}/.docker/docker-compose.yml;
1714

1815
exit 0;

.docker/.misc/rkt.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@
2020
.' / (_ )
2121
_. :(. )8P `
2222

23-
{{ .Values.Rkt.success }}
23+
Your project has been successfully launched!

.docker/.misc/rkt.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

.docker/.orbit/orbit-build.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,12 @@ commands:
1616
# | orbit run toolbox-build
1717
# |--------------------------------------------------------------------------
1818
# |
19-
# | Generates the Toolbox container configuration files and builds it.
20-
# |
21-
# | If ENABLE_DOCKER_SYNC=true, also generates the Docker Sync configuration
22-
# | file.
19+
# | Generates the Toolbox container configuration files.
2320
# |
2421

2522
- use: "toolbox-build"
2623
run:
27-
{{- if eq "true" .EnvFiles.Kickoff.ENABLE_DOCKER_SYNC }}
28-
- orbit generate -t=docker-sync.blueprint.yml -o=docker-sync.yml -v=Kickoff,kickoff.yml -e=Kickoff,.env
29-
{{- end }}
30-
- orbit generate -t=.docker/toolbox/Dockerfile.blueprint -o=.docker/toolbox/Dockerfile -v=Kickoff,kickoff.yml -e=Kickoff,.env
31-
- orbit generate -t=.docker/toolbox/conf.d/memory-limit.blueprint.ini -o=.docker/toolbox/conf.d/memory-limit.ini -v=Kickoff,kickoff.yml -e=Kickoff,.env
3224
- orbit generate -t=.docker/docker-compose-toolbox.blueprint.yml -o=.docker/docker-compose-toolbox.yml -v=Kickoff,kickoff.yml -e=Kickoff,.env
33-
{{- if eq "linux" .Os }}
34-
- /bin/bash .docker/.bin/usermod.sh toolbox
35-
{{- end }}
36-
- docker-compose -p {{ .EnvFiles.Kickoff.ENV }}{{ .Values.Kickoff.project.name }} -f .docker/docker-compose-toolbox.yml build
3725

3826
# |--------------------------------------------------------------------------
3927
# | orbit run proxy-build
@@ -65,18 +53,28 @@ commands:
6553
# | Generates the configuration files of your services and builds the NGINX
6654
# | and PHP-FPM containers.
6755
# |
56+
# | If ENABLE_DOCKER_SYNC=true, also generates the Docker Sync configuration
57+
# | file.
58+
# |
6859

6960
- use: "build"
7061
run:
62+
# Docker Sync
63+
{{- if eq "true" .EnvFiles.Kickoff.ENABLE_DOCKER_SYNC }}
64+
- orbit generate -t=docker-sync.blueprint.yml -o=docker-sync.yml -v=Kickoff,kickoff.yml -e=Kickoff,.env
65+
{{- end }}
66+
# MySQL
7167
- orbit generate -t=.docker/mysql/.secrets/mysql_password.blueprint.txt -o=.docker/mysql/.secrets/mysql_password.txt -e=Kickoff,.env
7268
- orbit generate -t=.docker/mysql/.secrets/mysql_root_password.blueprint.txt -o=.docker/mysql/.secrets/mysql_root_password.txt -e=Kickoff,.env
7369
- orbit generate -t=.docker/mysql/docker-entrypoint-initdb.d/databases.blueprint.sql -o=.docker/mysql/docker-entrypoint-initdb.d/databases.sql -v=Kickoff,kickoff.yml
70+
# PHP-FPM
7471
- orbit generate -t=.docker/php-fpm/conf.d/memory-limit.blueprint.ini -o=.docker/php-fpm/conf.d/memory-limit.ini -e=Kickoff,.env
7572
- orbit generate -t=.docker/php-fpm/php-fpm.d/memory-limit.blueprint.conf -o=.docker/php-fpm/php-fpm.d/memory-limit.conf -e=Kickoff,.env
7673
- orbit generate -t=.docker/php-fpm/php-fpm.d/security.blueprint.conf -o=.docker/php-fpm/php-fpm.d/security.conf -e=Kickoff,.env
7774
- orbit generate -t=.docker/php-fpm/Dockerfile.blueprint -o=.docker/php-fpm/Dockerfile -e=Kickoff,.env
75+
# Docker
7876
- orbit generate -t=.docker/docker-compose.blueprint.yml -o=.docker/docker-compose.yml -v=Kickoff,kickoff.yml -e=Kickoff,.env
7977
{{- if eq "linux" .Os }}
80-
- /bin/bash .docker/.bin/usermod.sh
78+
- /bin/bash .docker/.bin/linux-fix-permissions.sh
8179
{{- end }}
8280
- docker-compose -p {{ .EnvFiles.Kickoff.ENV }}{{ .Values.Kickoff.project.name }} -f .docker/docker-compose.yml build

.docker/.orbit/orbit-docker-commands.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
commands:
1212

1313
# |--------------------------------------------------------------------------
14-
# | orbit run toolbox-ash
14+
# | orbit run workspace
1515
# |--------------------------------------------------------------------------
1616
# |
17-
# | Connects through ash to the Toolbox container.
17+
# | Connects through ash to the PHP-FPM container.
1818
# |
1919

20-
- use: "toolbox-ash"
20+
- use: "workspace"
2121
run:
22-
- docker exec --user www-data -ti {{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-toolbox ash
22+
- docker exec --user www-data -ti {{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-php-fpm ash
2323

2424
# |--------------------------------------------------------------------------
2525
# | orbit run traefik-self-signed-certificate
@@ -31,7 +31,7 @@ commands:
3131
- use: "traefik-self-signed-certificate"
3232
run:
3333
{{- if eq "local" .EnvFiles.Kickoff.ENV }}
34-
- docker exec --user root -ti {{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-toolbox /bin/sh -c /scripts/traefik-self-signed-certificate.sh
34+
- docker-compose -p {{ .EnvFiles.Kickoff.ENV }}{{ .Values.Kickoff.project.name }} -f .docker/docker-compose-toolbox.yml run toolbox /bin/sh -c /scripts/traefik-self-signed-certificate.sh
3535
{{- else if eq .Os "windows" }}
3636
- cmd.exe /c echo Skipping self-signed certificate generation ...
3737
{{- else }}
@@ -51,7 +51,7 @@ commands:
5151
- use: "traefik-htdigest"
5252
run:
5353
{{- if ne "local" .EnvFiles.Kickoff.ENV }}
54-
- docker exec --user root -ti {{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-toolbox /bin/sh -c /scripts/traefik-htdigest.sh
54+
- docker-compose -p {{ .EnvFiles.Kickoff.ENV }}{{ .Values.Kickoff.project.name }} -f .docker/docker-compose-toolbox.yml run toolbox /bin/sh -c /scripts/traefik-htdigest.sh
5555
{{- else if eq .Os "windows" }}
5656
- cmd.exe /c echo Skipping .htdigest file generation ...
5757
{{- else }}
@@ -67,18 +67,18 @@ commands:
6767

6868
- use: "graylog-health-check"
6969
run:
70-
- docker exec --user root -ti {{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-toolbox /bin/sh -c /scripts/graylog-health-check.sh
70+
- docker-compose -p {{ .EnvFiles.Kickoff.ENV }}{{ .Values.Kickoff.project.name }} -f .docker/docker-compose-toolbox.yml run toolbox /bin/sh -c /scripts/graylog-health-check.sh
7171

7272
# |--------------------------------------------------------------------------
73-
# | orbit run graylog-passwords
73+
# | orbit run graylog-secrets
7474
# |--------------------------------------------------------------------------
7575
# |
76-
# | Generates Graylog passwords.
76+
# | Generates Graylog secrets.
7777
# |
7878

79-
- use: "graylog-passwords"
79+
- use: "graylog-secrets"
8080
run:
81-
- docker exec --user root -ti {{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-toolbox /bin/sh -c /scripts/graylog-passwords.sh
81+
- docker-compose -p {{ .EnvFiles.Kickoff.ENV }}{{ .Values.Kickoff.project.name }} -f .docker/docker-compose-toolbox.yml run toolbox /bin/sh -c /scripts/graylog-secrets.sh
8282

8383
# |--------------------------------------------------------------------------
8484
# | orbit run mysql-cli

.docker/.orbit/orbit-down.yml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,20 @@
55
# | This file describes the down commands of your project.
66
# | Feel free to add your own commands!
77
# |
8-
# | Down order: down graylog-down proxy-down toolbox-down
8+
# | Down order: down graylog-down proxy-down
99
# |
1010
# | https://github.com/gulien/orbit/
1111
# |
1212

1313
commands:
1414

15-
# |--------------------------------------------------------------------------
16-
# | orbit run toolbox-down
17-
# |--------------------------------------------------------------------------
18-
# |
19-
# | Stops the Toolbox container.
20-
# |
21-
# | It should be the last to stop.
22-
# |
23-
24-
- use: "toolbox-down"
25-
run:
26-
- docker-compose -p {{ .EnvFiles.Kickoff.ENV }}{{ .Values.Kickoff.project.name }} -f .docker/docker-compose-toolbox.yml down
27-
{{- if eq "true" .EnvFiles.Kickoff.ENABLE_DOCKER_SYNC }}
28-
- docker-sync clean -c=docker-sync.yml
29-
{{- end }}
30-
3115
# |--------------------------------------------------------------------------
3216
# | orbit run proxy-down
3317
# |--------------------------------------------------------------------------
3418
# |
3519
# | Stops the Traefik container.
3620
# |
37-
# | It should be stop just before the Toolbox container.
21+
# | It should be the last to stop.
3822
# |
3923

4024
- use: "proxy-down"
@@ -47,7 +31,7 @@ commands:
4731
# |
4832
# | Stops the Graylog containers.
4933
# |
50-
# | They should be stop just before the Traefik container.
34+
# | They should be stop before the Traefik container.
5135
# |
5236

5337
- use: "graylog-down"
@@ -60,11 +44,16 @@ commands:
6044
# |
6145
# | Stops the NGINX, PHP-FPM, MySQL, Redis and RabbitMQ containers.
6246
# |
47+
# | If ENABLE_DOCKER_SYNC=true, stops Docker Sync
48+
# |
6349
# | On "local" environment, also stops the phpMyAdmin container.
6450
# |
6551
# | They should be the first to stop.
6652
# |
6753

6854
- use: "down"
6955
run:
70-
- docker-compose -p {{ .EnvFiles.Kickoff.ENV }}{{ .Values.Kickoff.project.name }} -f .docker/docker-compose.yml down
56+
- docker-compose -p {{ .EnvFiles.Kickoff.ENV }}{{ .Values.Kickoff.project.name }} -f .docker/docker-compose.yml down
57+
{{- if eq "true" .EnvFiles.Kickoff.ENABLE_DOCKER_SYNC }}
58+
- docker-sync clean -c=docker-sync.yml
59+
{{- end }}

.docker/.orbit/orbit-misc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ commands:
1919

2020
- use: "rkt"
2121
run:
22-
- orbit generate -t=.docker/.misc/rkt.txt -v=Rkt,.docker/.misc/rkt.yml
22+
- orbit generate -t=.docker/.misc/rkt.txt

.docker/.orbit/orbit-up.yml

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,57 +5,43 @@
55
# | This file describes the up commands of your project.
66
# | Feel free to add your own commands!
77
# |
8-
# | Up order: toolbox-up proxy-up graylog-up up
8+
# | Up order: proxy-up graylog-up up
99
# |
1010
# | https://github.com/gulien/orbit/
1111
# |
1212

1313
commands:
1414

1515
# |--------------------------------------------------------------------------
16-
# | orbit run toolbox-up
16+
# | orbit run proxy-up
1717
# |--------------------------------------------------------------------------
1818
# |
19-
# | Starts the Toolbox container.
19+
# | Starts the Traefik container and calls the Toolbox container to generate
20+
# | the self-signed certificate on your "local" environment or the .htdigest
21+
# | file in others environments.
2022
# |
2123
# | It should be the first to start.
2224
# |
2325

24-
- use: "toolbox-up"
26+
- use: "proxy-up"
2527
run:
26-
{{- if eq "true" .EnvFiles.Kickoff.ENABLE_DOCKER_SYNC }}
27-
- docker-sync start -c=docker-sync.yml
28-
{{- end }}
29-
- docker-compose -p {{ .EnvFiles.Kickoff.ENV }}{{ .Values.Kickoff.project.name }} -f .docker/docker-compose-toolbox.yml up -d
3028
- orbit run traefik-self-signed-certificate -c=.docker/.orbit/orbit-docker-commands.yml -v=Kickoff,kickoff.yml -e=Kickoff,.env -s
3129
- orbit run traefik-htdigest -c=.docker/.orbit/orbit-docker-commands.yml -v=Kickoff,kickoff.yml -e=Kickoff,.env -s
32-
- orbit run graylog-passwords -c=.docker/.orbit/orbit-docker-commands.yml -v=Kickoff,kickoff.yml -e=Kickoff,.env -s
33-
34-
35-
# |--------------------------------------------------------------------------
36-
# | orbit run proxy-up
37-
# |--------------------------------------------------------------------------
38-
# |
39-
# | Starts the Traefik container.
40-
# |
41-
# | It should be start after the Toolbox container.
42-
# |
43-
44-
- use: "proxy-up"
45-
run:
4630
- docker-compose -p kickoff -f .docker/docker-compose-proxy.yml up -d
4731

4832
# |--------------------------------------------------------------------------
4933
# | orbit run graylog-up
5034
# |--------------------------------------------------------------------------
5135
# |
52-
# | Starts the Graylog containers.
36+
# | Starts the Graylog containers and calls the Toolbox container to generate
37+
# | the Graylog secrets.
5338
# |
5439
# | They should be start after the Traefik container.
5540
# |
5641

5742
- use: "graylog-up"
5843
run:
44+
- orbit run graylog-secrets -c=.docker/.orbit/orbit-docker-commands.yml -v=Kickoff,kickoff.yml -e=Kickoff,.env -s
5945
- docker-compose -p {{ .EnvFiles.Kickoff.ENV }}{{ .Values.Kickoff.project.name }} -f .docker/docker-compose-graylog.yml up -d
6046

6147
# |--------------------------------------------------------------------------
@@ -64,6 +50,8 @@ commands:
6450
# |
6551
# | Starts the NGINX, PHP-FPM, MySQL, Redis and RabbitMQ containers.
6652
# |
53+
# | If ENABLE_DOCKER_SYNC=true, starts Docker Sync.
54+
# |
6755
# | On "local" environment, also starts the phpMyAdmin container.
6856
# |
6957
# | They should be the last to start.
@@ -72,4 +60,7 @@ commands:
7260
- use: "up"
7361
run:
7462
- orbit run graylog-health-check -c=.docker/.orbit/orbit-docker-commands.yml -v=Kickoff,kickoff.yml -e=Kickoff,.env -s
63+
{{- if eq "true" .EnvFiles.Kickoff.ENABLE_DOCKER_SYNC }}
64+
- docker-sync start -c=docker-sync.yml
65+
{{- end }}
7566
- docker-compose -p {{ .EnvFiles.Kickoff.ENV }}{{ .Values.Kickoff.project.name }} -f .docker/docker-compose.yml up -d

.docker/docker-compose-proxy.blueprint.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ services:
2626
- ./traefik/traefik.toml:/traefik.toml:ro
2727
{{- if eq "local" .EnvFiles.Kickoff.ENV }}
2828
- ./toolbox/generated/traefik/certs:/tests:ro
29+
{{- else }}
30+
{{- range $env, $virtualhost := .Values.Kickoff.project.virtualhost }}
31+
{{- if eq $env $.EnvFiles.Kickoff.ENV }}
32+
- {{ $.EnvFiles.Kickoff.TRAEFIK_CERT_FILE_PATH }}:/certs/{{ $virtualhost }}.crt:ro
33+
- {{ $.EnvFiles.Kickoff.TRAEFIK_KEY_FILE_PATH }}:/certs/{{ $virtualhost }}.key:ro
34+
{{- end }}
35+
{{- end }}
2936
{{- end }}
3037
{{- if ne "local" .EnvFiles.Kickoff.ENV }}
3138
- ./toolbox/generated/traefik/auth/:/auth/:ro

.docker/docker-compose-toolbox.blueprint.yml

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,9 @@ services:
55

66

77
toolbox:
8-
build:
9-
context: ./toolbox
10-
args:
11-
- UID={{ if eq "linux" .Os }}${UID}{{ else }}1000{{ end }}
8+
image: gulnap/kickoff-docker-php-images:toolbox-3.6-rc1
129
container_name: {{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-toolbox
13-
restart: {{ if ne "local" .EnvFiles.Kickoff.ENV }}unless-stopped{{ else }}"no"{{ end }}
14-
tty: true
15-
working_dir: /var/www/html
10+
restart: "no"
1611
networks:
1712
- backend
1813
environment:
@@ -29,12 +24,6 @@ services:
2924
labels:
3025
- traefik.enable=false
3126
volumes:
32-
{{- if eq "true" .EnvFiles.Kickoff.ENABLE_DOCKER_SYNC }}
33-
- {{ .EnvFiles.Kickoff.ENV }}{{ .Values.Kickoff.project.name }}_sync_app:/var/www/html:nocopy
34-
{{- else }}
35-
- ../app:/var/www/html:{{ if eq "darwin" .Os }}cached{{ else }}rw{{ end }}
36-
{{- end }}
37-
- ./toolbox/conf.d/memory-limit.ini:/usr/local/etc/php/conf.d/memory-limit.ini:ro
3827
- ./toolbox/generated:/generated:rw
3928
- ./toolbox/scripts:/scripts:ro
4029

@@ -43,12 +32,4 @@ networks:
4332

4433

4534
backend:
46-
driver: bridge
47-
48-
{{ if eq "true" .EnvFiles.Kickoff.ENABLE_DOCKER_SYNC }}
49-
volumes:
50-
51-
52-
{{ .EnvFiles.Kickoff.ENV }}{{ .Values.Kickoff.project.name }}_sync_app:
53-
external: true
54-
{{- end }}
35+
driver: bridge

0 commit comments

Comments
 (0)