Last active
June 14, 2016 14:04
-
-
Save sroze/ab1e8fc436a72b2fb2a402e9ee70615a to your computer and use it in GitHub Desktop.
Docker & CP example 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
environment_variables: | |
- name: GITHUB_TOKEN | |
value: thevalue | |
- name: SOME_SECRET | |
value: blahblha |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
... | |
"scripts": { | |
"update-parameters": [ | |
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters" | |
] | |
}, | |
... | |
"extra": { | |
"symfony-app-dir": "app", | |
"symfony-web-dir": "web", | |
"symfony-assets-install": "relative", | |
"incenteev-parameters": [{ | |
"file": "app/config/parameters.yml", | |
"env-map": { | |
"database_host": "DATABASE_HOST", | |
"database_password": "DATABASE_PASSWORD", | |
"database_user": "DATABASE_USER" | |
} | |
}] | |
}, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
environment_variables: | |
- name: LOCAL_VARIABLE | |
value: foobar | |
tasks: | |
images: | |
build: | |
environment: | |
- name: GITHUB_TOKEN | |
value: ${GITHUB_TOKEN} | |
services: | |
api: | |
image: docker.io/inviqasession/cp-river | |
production: | |
deploy: | |
cluster: gke | |
services: | |
rabbitmq: | |
locked: true | |
blackfire: | |
locked: true | |
api: | |
endpoints: | |
- | |
name: https | |
type: NodePort | |
ssl_certificates: | |
- | |
name: continuouspipeio | |
cert: ${WILDCARD_SSL_CERT} | |
key: ${WILDCARD_SSL_KEY} | |
specification: | |
accessibility: | |
from_external: true | |
worker: | |
specification: | |
source: | |
from_service: api | |
environment_variables: | |
- name: SOME_SECRET | |
value: ${SOME_SECRET} | |
- name: LOCAL_VARIABLE | |
value: ${LOCAL_VARIABLE} | |
migrations: | |
run: | |
cluster: gke | |
image: | |
from_service: api | |
commands: | |
- composer run-script update-parameters | |
- php app/console doctrine:migrations:migrate --no-interaction | |
environment_variables: | |
- name: FOO | |
value: ${LOCAL_VARIABLE} | |
filter: | |
expression: code_reference.branch == 'master' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ... | |
[...] | |
# Add the application | |
ADD . /app | |
WORKDIR /app | |
# Install dependencies | |
ARG GITHUB_TOKEN= | |
ARG SYMFONY_ENV=prod | |
RUN if [ -n "$GITHUB_TOKEN" ]; then \ | |
composer config github-oauth.github.com $GITHUB_TOKEN && \ | |
composer install -o --no-interaction; \ | |
fi; \ | |
app/console assets:install | |
[...] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment