-
Notifications
You must be signed in to change notification settings - Fork 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
Prepare the project to be deployed #85
Conversation
name: {{ template "fullname" . }} | ||
spec: | ||
accessModes: | ||
- ReadWriteMany |
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 supported by GCE
@@ -16,6 +16,7 @@ service: | |||
externalPort: 8080 | |||
internalPort: 8080 | |||
name: code-annotation | |||
internalDatabasePath: /var/code-annotation |
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.
This does not belong to the service
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.
How does the application know that database path is in /var/code-annotation
?
93e52ce
to
8d1b6a1
Compare
Updated PR description as src-d/issues-infrastructure#129 is done. So, right now what's left before merging this seems to be:
Please, feel free to update this comment in case something else is missing, etc. |
c1ebb3f
to
10bf191
Compare
\cc @smacker for review |
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.
impossible to run locally with defaults
@@ -16,7 +16,7 @@ type appConfig struct { | |||
Host string `envconfig:"HOST"` | |||
Port int `envconfig:"PORT" default:"8080"` | |||
UIDomain string `envconfig:"UI_DOMAIN" default:"http://127.0.0.1:8080"` | |||
DBConn string `envconfig:"DB_CONNECTION" default:"sqlite://./internal.db"` | |||
DBConn string `envconfig:"DB_CONNECTION" default:"sqlite:///var/code-annotation/internal.db"` |
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.
by default server will fail because /var/code-annotation
doesn't exist.
not very user-friendly.
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.
Since we're doing prod first that's the expected location we agreed.
We could maybe change the .env.tpl
to be:
DB_CONNECTION=sqlite://internal.db
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.
that's what I mean. It's absolutely okay to have /var/code-annotation
path as default, but let's keep it simple for developers. Thanks!
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.
👍 If anybody else wonders, feedback seems to be addressed and default for dev env was changed as requested.
Makefile
Outdated
|
||
# ci variables | ||
TRAVIS_BUILD_DIR ?= $(shell pwd) | ||
CGO_ENABLED = 1 |
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?
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.
at some point, it was needed, but I also needed to change a big amount of things to make the project deployable.... and maybe another change made not necessary the CGO.
Removed
Makefile
Outdated
# Set enviroment variables from .env file | ||
ENV ?= .env | ||
$(ENV): | ||
touch $(ENV) |
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.
I would prefer import .env
only if it exists instead of creating new one. But up to you.
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.
Done 🗡️
package.json
Outdated
@@ -15,7 +17,7 @@ | |||
"react-split-pane": "^0.1.74", | |||
"redux": "^3.7.2", | |||
"redux-devtools-extension": "^2.13.2", | |||
"redux-little-router": "^14.2.3", | |||
"redux-little-router": "^15.0.0", |
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.
could you describe what was the problem?
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.
While trying to make the project buildable it was needed at some point (it was somehow related to FormidableLabs/redux-little-router#266), but it is not longer needed (idk why), so rollbacked.
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.
good job! don't forget to squash commit later please.
#36 is merged now, rebase is in order. LGTM after that! 🎉 |
Default value for UI_DOMAIN will be REACT_APP_SERVER_URL
Add react-app-rewired to prod dependencies Remove yarn install from Travis because it's a lint/test dependency
Added during code review: - Provide a default valur for DB_CONNECTION while developing
rebased |
Depends on #36 Single BinnaryDepends on #91 Remove PR from Drone configDepends on #90 Define a persistentVolume for internal databaseDepends on https://github.com/src-d/issues-infrastructure/issues/129 Push an example DB into the code-annotation volumeDepends on https://github.com/src-d/issues-infrastructure/issues/131 Push the final DB into the code-annotation volumeMany different fixes and other additions; see commit messages 🗡️