-
-
Notifications
You must be signed in to change notification settings - Fork 224
Feature/update demo deployment #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/update demo deployment #26
Conversation
4956a6b
to
38ddcc1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I missed something, but uploading the .enc
file in the repository looks like a big security issue to me.
You should:
- Remove it immediatly
- Revoke the related account
- Store the credentials as a Travis secret too
.travis.yml
Outdated
sudo: required | ||
|
||
# TODO: Verify this upgrade still works. | ||
php: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need PHP at all?
.travis.yml
Outdated
php: | ||
- 7.2 | ||
|
||
# Specify which branches to build using a safelist: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Travis must still be execute for all branches. The deployment for master only.
.travis.yml
Outdated
|
||
# clone repositories to a depth of 1 commit | ||
# Warning: Travis CI won’t build commits that are in the queue when pushing a new commit and depth set to 1. | ||
git: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
.travis.yml
Outdated
services: | ||
- docker | ||
- redis-server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
.travis.yml
Outdated
|
||
cache: | ||
yarn: true | ||
directories: | ||
- admin/node_modules | ||
- client/node_modules | ||
- api/vendor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
.travis.yml
Outdated
|
||
script: | ||
- docker-compose up -d | ||
- linux-amd64/helm lint api/helm/api/ | ||
- sleep 20 | ||
- sh -c "cd admin && PUBLIC_URL="/api-demo-admin-test" yarn install && yarn build" | ||
- sh -c "cd client && PUBLIC_URL="/api-demo-client-test" yarn install && yarn build" | ||
- sh -c "cd admin && PUBLIC_URL="/api-demo-admin-test" yarn install --pure-lockfile && yarn build" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be run in the Docker image (while not mandatory, it will probably be faster outside of the container)
.travis.yml
Outdated
- gcloud config set project api-platform-demo-209807 | ||
- mkdir -p ${HOME}/.kube | ||
- cp ./kubeConfig ${HOME}/.kube/config | ||
- curl -O https://storage.googleapis.com/kubernetes-helm/helm-v2.7.2-linux-amd64.tar.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already installed
.travis.yml
Outdated
- sudo mv linux-amd64/helm /usr/local/bin/helm | ||
- gcloud container clusters get-credentials "api-platform-demo" | ||
- helm init | ||
- APP_ENV=prod composer install --no-scripts --no-dev --no-progress --no-suggest --optimize-autoloader --classmap-authoritative --no-interaction --prefer-dist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessary, must be done in the Docker image directly
.travis.yml
Outdated
--set secret=${APP_SECRET} \ | ||
--set postgresUser=${DATABASE_USER},postgresPassword="${DATABASE_PASSWORD}",postgresDatabase=${DATABASE_NAME} \ | ||
--set postgresql.persistence.enabled=true \ | ||
--set corsAllowOrigin='^https?://localhost(:[0-9]*)?$' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*
to make the API available publicly
docker-compose.yml
Outdated
@@ -16,7 +16,7 @@ services: | |||
volumes: | |||
- ./api:/srv/api:rw,cached | |||
# If you develop on Linux, uncomment the following line to use a bind-mounted host directory instead | |||
# - ./api/var:/srv/api/var:rw |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be reverted (people will run this project file on Mac)
a5e1cec
to
325f0a7
Compare
From https://docs.travis-ci.com/user/encrypting-files/#Automated-Encryption
|
2e32cb3
to
7edfb4d
Compare
7c5dea4
to
538a9b2
Compare
d5602d8
to
07da825
Compare
07da825
to
bb2ef04
Compare
bb2ef04
to
a01058a
Compare
WIP - Please do not merge it.