-
Notifications
You must be signed in to change notification settings - Fork 422
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
Update Dockerfile
& docker-compose
for faster, usable builds
#2942
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
145d039
Convert Dockerfile to multistage build
grahamalama 4ad138b
psycopg2 (isntead of binary) in requirements.txt
grahamalama fec0baf
Nest docker-compose services in "services" key
grahamalama 6166f80
Provide image name to kinto in docker-compose
grahamalama File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,27 @@ | ||
db: | ||
image: postgres | ||
environment: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
cache: | ||
image: library/memcached | ||
web: | ||
image: kinto/kinto-server | ||
links: | ||
- db | ||
- cache | ||
ports: | ||
- "8888:8888" | ||
environment: | ||
KINTO_CACHE_BACKEND: kinto.core.cache.memcached | ||
KINTO_CACHE_HOSTS: cache:11211 cache:11212 | ||
KINTO_STORAGE_BACKEND: kinto.core.storage.postgresql | ||
KINTO_STORAGE_URL: postgresql://postgres:postgres@db/postgres | ||
KINTO_PERMISSION_BACKEND: kinto.core.permission.postgresql | ||
KINTO_PERMISSION_URL: postgresql://postgres:postgres@db/postgres | ||
version: "3" | ||
services: | ||
db: | ||
image: postgres:14 | ||
environment: | ||
POSTGRES_NAME: postgres | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
cache: | ||
image: memcached:1 | ||
web: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
image: kinto/kinto-server:latest | ||
depends_on: | ||
- db | ||
- cache | ||
ports: | ||
- "8888:8888" | ||
environment: | ||
KINTO_CACHE_BACKEND: kinto.core.cache.memcached | ||
KINTO_CACHE_HOSTS: cache:11211 cache:11212 | ||
KINTO_STORAGE_BACKEND: kinto.core.storage.postgresql | ||
KINTO_STORAGE_URL: postgresql://postgres:postgres@db/postgres | ||
KINTO_PERMISSION_BACKEND: kinto.core.permission.postgresql | ||
KINTO_PERMISSION_URL: postgresql://postgres:postgres@db/postgres |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 change is because
kinto[postgresql]
requirespsycopg2
(notpsycopg2-binary
)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.
psycopg2-binary is psycopg2 precompiled, we should keep the binary version IMHO.
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 that as well, but I think in order to do this, we'll have to change
psycopg2
topsycopg2-binary
insetup.cfg
. Would that be acceptable? I didn't know if there was a good reason we needed to buildpsycopg2
when installingkinto
.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 think it makes sense to align the dependencies names. Shall we try
psycopg2-binary
everywhere?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.
Yep, we certainly can. I was just ensuring there wasn't a good reason to build
psycopg2
. From their docs:and
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.
@Natim I'm going to merge this PR as-is, then open a follow-up issue where we can further discuss using
psycopg2
vspsycopg2-binary
EDIT:
Follow-up issue #2943