This repository has been archived by the owner on Feb 28, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
Make Docker great again #163
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
ba55e58
fixes elm docker file to make docker work again for development with …
15ab50e
makes rest_framework statics available trough nginx
63529dd
removes .env from .gitignore, so jarbas will able to have automated d…
ed7a711
Revert "removes .env from .gitignore, so jarbas will able to have aut…
40a939a
moves environment variables from .env to docker-compose so the runner…
3b73256
remove the copy of .env in Dockerfile because it is not necessary any…
246e87f
uses best practice to handle CMD in Docker to do not surprises runnin…
fd09172
uses images from docker hub instead of build every time that docker-c…
8b73b79
fixes command to run docker-compose on README
f60ea8e
change beta images for oficials from datasciencebr Docker Hub
1cdab6d
makes GOOGLE_STREET_VIEW_API_KEY work easily with docker compose and …
6d01828
exposes the database port to make it easy to connect
f2a6f31
adds instructions to seed database with a new reimbursements.xz in th…
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
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,5 +1,5 @@ | ||
run.jarbas: | ||
docker-compose up -d --build | ||
docker-compose up -d | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We must reflect this change in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed: 8b73b79 |
||
docker-compose run --rm jarbas python manage.py ceapdatasets | ||
docker-compose run --rm jarbas python manage.py migrate | ||
|
||
|
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,18 +1,23 @@ | ||
version: '2' | ||
services: | ||
jarbas: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
image: datasciencebr/jarbas-backend | ||
volumes: | ||
- "staticfiles:/code/staticfiles" | ||
- "assets:/code/staticfiles" | ||
- "./:/code" | ||
- ".env:/code/.env" | ||
environment: | ||
- SECRET_KEY=lets-rock | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's extremely unsafe to use this for production. As the focus is development environment this is not a problem right now… but I decided to let this note here so we can (later) take care of that and of |
||
- DATABASE_URL=postgres://jarbas:mysecretpassword@db/jarbas | ||
- CACHE_BACKEND=django.core.cache.backends.memcached.MemcachedCache | ||
- CACHE_LOCATION=cache:11211 | ||
- DEBUG=True | ||
- ALLOWED_HOSTS=localhost,127.0.0.1 | ||
- AMAZON_S3_BUCKET=serenata-de-amor-data | ||
- AMAZON_S3_REGION=s3-sa-east-1 | ||
- AMAZON_S3_CEAPTRANSLATION_DATE=2016-08-08 | ||
- GOOGLE_STREET_VIEW_API_KEY | ||
|
||
depends_on: | ||
- elm | ||
- db | ||
|
@@ -24,18 +29,15 @@ services: | |
- apps | ||
|
||
elm: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile-elm | ||
image: datasciencebr/jarbas-frontend | ||
volumes: | ||
- "./:/code" | ||
- "/code/node_modules" | ||
- "assets:/code/jarbas/frontend/static" | ||
command: [yarn, watch] | ||
|
||
nginx: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile-nginx | ||
image: datasciencebr/jarbas-server | ||
volumes: | ||
- "assets:/opt/jarbas/staticfiles" | ||
ports: | ||
|
@@ -51,6 +53,8 @@ services: | |
- POSTGRES_PASSWORD=mysecretpassword | ||
- POSTGRES_USER=jarbas | ||
- POSTGRES_DB=jarbas | ||
ports: | ||
- "5432:5432" | ||
networks: | ||
- backend | ||
volumes: | ||
|
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.
In theory we were installing PostgreSQL because
pyscopg2
(PostgreSQL driver for Python) needs one or other library that comes with PostgreSQL. If thisapt-get
is coming afterpip
this might not be necessary anymore.TLDR IMHO we can get rid of line 5