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

Commit 13bbd46

Browse files
author
Julien Neuhart
authored
V2.0.0 beta1 (#10)
1 parent c7b0cbb commit 13bbd46

File tree

106 files changed

+1843
-1649
lines changed

Some content is hidden

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

106 files changed

+1843
-1649
lines changed

.docker/.bin/usermod.sh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )";
4+
ROOT=${DIR}/../..;
5+
6+
sedi()
7+
{
8+
sed --version >/dev/null 2>&1 && sed -i -- "$@" || sed -i "" "$@";
9+
}
10+
11+
# 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;
17+
18+
exit 0;

.docker/.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
docker-compose.yml
2+
docker-compose-graylog.yml
3+
docker-compose-proxy.yml
4+
docker-compose-toolbox.yml
5+
docker-sync.yml

.docker/.misc/rkt.txt

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
,:
3+
,' |
4+
/ :
5+
--' /
6+
\/ />/
7+
/ /_\
8+
__/ /
9+
)'-. /
10+
./ :\
11+
/.' '
12+
'/'
13+
+
14+
'
15+
`.
16+
.-"-
17+
( |
18+
. .-' '.
19+
( (. )8:
20+
.' / (_ )
21+
_. :(. )8P `
22+
23+
{{ .Values.Rkt.success }}

.docker/.misc/rkt.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
success: Your project has been sucessfully launched!

.docker/.orbit/orbit-build.yml

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# |--------------------------------------------------------------------------
2+
# | Orbit build commands
3+
# |--------------------------------------------------------------------------
4+
# |
5+
# | This file describes the build commands of your project.
6+
# | Feel free to add your own commands!
7+
# |
8+
# | Build order: toolbox-build proxy-build graylog-build build
9+
# |
10+
# | https://github.com/gulien/orbit/
11+
# |
12+
13+
commands:
14+
15+
# |--------------------------------------------------------------------------
16+
# | orbit run toolbox-build
17+
# |--------------------------------------------------------------------------
18+
# |
19+
# | Generates all configuration files plus the toolbox docker-compose file
20+
# | and builds the toolbox container.
21+
# |
22+
23+
- use: "toolbox-build"
24+
run:
25+
{{- if eq "true" .EnvFiles.Kickoff.ENABLE_DOCKER_SYNC }}
26+
- orbit generate -t=.docker/docker-sync.blueprint.yml -o=.docker/docker-sync.yml -v=Kickoff,kickoff.yml -e=Kickoff,.env
27+
{{- end }}
28+
- orbit generate -t=.docker/toolbox/Dockerfile.blueprint -o=.docker/toolbox/Dockerfile -v=Kickoff,kickoff.yml -e=Kickoff,.env
29+
- 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
30+
- orbit generate -t=.docker/docker-compose-toolbox.blueprint.yml -o=.docker/docker-compose-toolbox.yml -v=Kickoff,kickoff.yml -e=Kickoff,.env
31+
{{- if eq "linux" .Os }}
32+
- /bin/bash .docker/.bin/usermod.sh toolbox
33+
{{- end }}
34+
- docker-compose -p {{ .EnvFiles.Kickoff.ENV }}{{ .Values.Kickoff.project.name }} -f .docker/docker-compose-toolbox.yml build
35+
36+
# |--------------------------------------------------------------------------
37+
# | orbit run proxy-build
38+
# |--------------------------------------------------------------------------
39+
# |
40+
# | Generates the configuration and docker-compose files for Traefik.
41+
# |
42+
43+
- use: "proxy-build"
44+
run:
45+
- orbit generate -t=.docker/traefik/traefik.blueprint.toml -o=.docker/traefik/traefik.toml -v=Kickoff,kickoff.yml -e=Kickoff,.env
46+
- orbit generate -t=.docker/docker-compose-proxy.blueprint.yml -o=.docker/docker-compose-proxy.yml -v=Kickoff,kickoff.yml -e=Kickoff,.env
47+
48+
# |--------------------------------------------------------------------------
49+
# | orbit run graylog-build
50+
# |--------------------------------------------------------------------------
51+
# |
52+
# | Generates the configuration and docker-compose files for Graylog.
53+
# |
54+
55+
- use: "graylog-build"
56+
run:
57+
- orbit generate -t=.docker/docker-compose-graylog.blueprint.yml -o=.docker/docker-compose-graylog.yml -v=Kickoff,kickoff.yml -e=Kickoff,.env
58+
59+
# |--------------------------------------------------------------------------
60+
# | orbit run build
61+
# |--------------------------------------------------------------------------
62+
# |
63+
# | Generates all configuration files plus the main docker-compose file and
64+
# | builds the NGINX and PHP-FPM containers.
65+
# |
66+
67+
- use: "build"
68+
run:
69+
- orbit generate -t=.docker/mysql/.secrets/mysql_password.blueprint.txt -o=.docker/mysql/.secrets/mysql_password.txt -e=Kickoff,.env
70+
- orbit generate -t=.docker/mysql/.secrets/mysql_root_password.blueprint.txt -o=.docker/mysql/.secrets/mysql_root_password.txt -e=Kickoff,.env
71+
- 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
72+
- orbit generate -t=.docker/php-fpm/conf.d/memory-limit.blueprint.ini -o=.docker/php-fpm/conf.d/memory-limit.ini -e=Kickoff,.env
73+
- 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
74+
- orbit generate -t=.docker/php-fpm/php-fpm.d/security.blueprint.conf -o=.docker/php-fpm/php-fpm.d/security.conf -e=Kickoff,.env
75+
- orbit generate -t=.docker/php-fpm/Dockerfile.blueprint -o=.docker/php-fpm/Dockerfile -e=Kickoff,.env
76+
- orbit generate -t=.docker/docker-compose.blueprint.yml -o=.docker/docker-compose.yml -v=Kickoff,kickoff.yml -e=Kickoff,.env
77+
{{- if eq "linux" .Os }}
78+
- /bin/bash .docker/.bin/usermod.sh
79+
{{- end }}
80+
- docker-compose -f .docker/docker-compose.yml build
+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# |--------------------------------------------------------------------------
2+
# | Orbit Docker commands
3+
# |--------------------------------------------------------------------------
4+
# |
5+
# | This file describes the Docker commands of your project.
6+
# | Feel free to add your own commands!
7+
# |
8+
# | https://github.com/gulien/orbit/
9+
# |
10+
11+
commands:
12+
13+
# |--------------------------------------------------------------------------
14+
# | orbit run toolbox-ash
15+
# |--------------------------------------------------------------------------
16+
# |
17+
# | Connects through ash to the toolbox container.
18+
# |
19+
20+
- use: "toolbox-ash"
21+
run:
22+
- docker exec --user www-data -ti {{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-toolbox ash
23+
24+
# |--------------------------------------------------------------------------
25+
# | orbit run traefik-self-signed-certificate
26+
# |--------------------------------------------------------------------------
27+
# |
28+
# | Generates the self-signed certificate is current environment is "local".
29+
# |
30+
31+
- use: "traefik-self-signed-certificate"
32+
run:
33+
{{- 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
35+
{{- else if eq .Os "windows" }}
36+
- cmd.exe /c echo Skipping self-signed certificate generation ...
37+
{{- else }}
38+
- echo Skipping self-signed certificate generation ...
39+
{{- end }}
40+
41+
# |--------------------------------------------------------------------------
42+
# | orbit run traefik-htdigest
43+
# |--------------------------------------------------------------------------
44+
# |
45+
# | Generates the .htdigest file which is used to authenticate on the Traefik
46+
# | dashboard.
47+
# |
48+
# | Only for environments <> "local".
49+
# |
50+
51+
- use: "traefik-htdigest"
52+
run:
53+
{{- 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
55+
{{- else if eq .Os "windows" }}
56+
- cmd.exe /c echo Skipping .htdigest file generation ...
57+
{{- else }}
58+
- echo Skipping .htdigest file generation ...
59+
{{- end }}
60+
61+
# |--------------------------------------------------------------------------
62+
# | orbit run graylog-health-check
63+
# |--------------------------------------------------------------------------
64+
# |
65+
# | Waits Graylog to be ready.
66+
# |
67+
68+
- use: "graylog-health-check"
69+
run:
70+
- docker exec --user root -ti {{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-toolbox /bin/sh -c /scripts/graylog-health-check.sh
71+
72+
# |--------------------------------------------------------------------------
73+
# | orbit run graylog-passwords
74+
# |--------------------------------------------------------------------------
75+
# |
76+
# | Generates Graylog passwords.
77+
# |
78+
79+
- use: "graylog-passwords"
80+
run:
81+
- docker exec --user root -ti {{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-toolbox /bin/sh -c /scripts/graylog-passwords.sh
82+
83+
# |--------------------------------------------------------------------------
84+
# | orbit run mysql-cli
85+
# |--------------------------------------------------------------------------
86+
# |
87+
# | Opens the MySQL cli as root.
88+
# |
89+
# | On environments <> "local", it will ask you the MySQL root password.
90+
# |
91+
92+
- use: "mysql-cli"
93+
run:
94+
- docker exec -ti {{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-mysql mysql -uroot -p{{ if eq "local" .EnvFiles.Kickoff.ENV }}{{ .EnvFiles.Kickoff.MYSQL_ROOT_PASSWORD }}{{ end }}

.docker/.orbit/orbit-down.yml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# |--------------------------------------------------------------------------
2+
# | Orbit down commands
3+
# |--------------------------------------------------------------------------
4+
# |
5+
# | This file describes the down commands of your project.
6+
# | Feel free to add your own commands!
7+
# |
8+
# | Down order: down graylog-down proxy-down toolbox-down
9+
# |
10+
# | https://github.com/gulien/orbit/
11+
# |
12+
13+
commands:
14+
15+
# |--------------------------------------------------------------------------
16+
# | orbit run toolbox-down
17+
# |--------------------------------------------------------------------------
18+
# |
19+
# | Stops the toolbox container.
20+
# |
21+
22+
- use: "toolbox-down"
23+
run:
24+
{{- if eq "true" .EnvFiles.Kickoff.ENABLE_DOCKER_SYNC }}
25+
- docker-sync stop -c=.docker/docker-sync.yml
26+
{{- end }}
27+
- docker-compose -p {{ .EnvFiles.Kickoff.ENV }}{{ .Values.Kickoff.project.name }} -f .docker/docker-compose-toolbox.yml down
28+
29+
# |--------------------------------------------------------------------------
30+
# | orbit run graylog-down
31+
# |--------------------------------------------------------------------------
32+
# |
33+
# | Stops the Graylog containers.
34+
# |
35+
36+
- use: "graylog-down"
37+
run:
38+
- docker-compose -p {{ .EnvFiles.Kickoff.ENV }}{{ .Values.Kickoff.project.name }} -f .docker/docker-compose-graylog.yml down
39+
40+
# |--------------------------------------------------------------------------
41+
# | orbit run proxy-down
42+
# |--------------------------------------------------------------------------
43+
# |
44+
# | Stops the Traefik container.
45+
# |
46+
# | If your others containers are still running, make sure you have run "down".
47+
# |
48+
49+
- use: "proxy-down"
50+
run:
51+
- docker-compose -p kickoff -f .docker/docker-compose-proxy.yml down
52+
53+
# |--------------------------------------------------------------------------
54+
# | orbit run down
55+
# |--------------------------------------------------------------------------
56+
# |
57+
# | Stops the NGINX, PHP-FPM, MySQL, Redis and RabbitMQ containers.
58+
# |
59+
# | On "local" environment, also stops the phpMyAdmin container.
60+
# |
61+
62+
- use: "down"
63+
run:
64+
- docker-compose -p {{ .EnvFiles.Kickoff.ENV }}{{ .Values.Kickoff.project.name }} -f .docker/docker-compose.yml down

.docker/.orbit/orbit-misc.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# |--------------------------------------------------------------------------
2+
# | Orbit misc commands
3+
# |--------------------------------------------------------------------------
4+
# |
5+
# | This file describes the misc commands of your project.
6+
# | Feel free to add your own commands!
7+
# |
8+
# | https://github.com/gulien/orbit/
9+
# |
10+
11+
commands:
12+
13+
# |--------------------------------------------------------------------------
14+
# | orbit run rkt
15+
# |--------------------------------------------------------------------------
16+
# |
17+
# | Prints a nice rocket to Stdout.
18+
# |
19+
20+
- use: "rkt"
21+
run:
22+
- orbit generate -t=.docker/.misc/rkt.txt -v=Rkt,.docker/.misc/rkt.yml

.docker/.orbit/orbit-up.yml

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# |--------------------------------------------------------------------------
2+
# | Orbit up commands
3+
# |--------------------------------------------------------------------------
4+
# |
5+
# | This file describes the up commands of your project.
6+
# | Feel free to add your own commands!
7+
# |
8+
# | Up order: toolbox-up proxy-up graylog-up up
9+
# |
10+
# | https://github.com/gulien/orbit/
11+
# |
12+
13+
commands:
14+
15+
# |--------------------------------------------------------------------------
16+
# | orbit run toolbox-up
17+
# |--------------------------------------------------------------------------
18+
# |
19+
# | Starts the toolbox container.
20+
# |
21+
22+
- use: "toolbox-up"
23+
run:
24+
{{- if eq "true" .EnvFiles.Kickoff.ENABLE_DOCKER_SYNC }}
25+
- docker-sync start -c=.docker/docker-sync.yml
26+
{{- end }}
27+
- docker-compose -p {{ .EnvFiles.Kickoff.ENV }}{{ .Values.Kickoff.project.name }} -f .docker/docker-compose-toolbox.yml up -d
28+
29+
# |--------------------------------------------------------------------------
30+
# | orbit run proxy-up
31+
# |--------------------------------------------------------------------------
32+
# |
33+
# | Starts the Traefik container.
34+
# |
35+
36+
- use: "proxy-up"
37+
run:
38+
- docker-compose -p kickoff -f .docker/docker-compose-proxy.yml up -d
39+
40+
# |--------------------------------------------------------------------------
41+
# | orbit run graylog-up
42+
# |--------------------------------------------------------------------------
43+
# |
44+
# | Starts the Graylog containers.
45+
# |
46+
47+
- use: "graylog-up"
48+
run:
49+
- docker-compose -p {{ .EnvFiles.Kickoff.ENV }}{{ .Values.Kickoff.project.name }} -f .docker/docker-compose-graylog.yml up -d
50+
51+
# |--------------------------------------------------------------------------
52+
# | orbit run up
53+
# |--------------------------------------------------------------------------
54+
# |
55+
# | Starts the NGINX, PHP-FPM, MySQL, Redis and RabbitMQ containers.
56+
# |
57+
# | On "local" environment, also starts the phpMyAdmin container.
58+
# |
59+
# | Make sure you have start other containers!
60+
# |
61+
62+
- use: "up"
63+
run:
64+
- orbit run graylog-health-check -c=.docker/.orbit/orbit-docker-commands.yml -v=Kickoff,kickoff.yml -e=Kickoff,.env -s
65+
- docker-compose -p {{ .EnvFiles.Kickoff.ENV }}{{ .Values.Kickoff.project.name }} -f .docker/docker-compose.yml up -d

0 commit comments

Comments
 (0)