-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve docs and template files following real use
- Loading branch information
Showing
5 changed files
with
37 additions
and
5 deletions.
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 |
---|---|---|
|
@@ -30,17 +30,41 @@ as `PYENVD_HOST` to establish a connection from the container to PyCharm. | |
How to dockerize an existing project | ||
==================================== | ||
|
||
* Rename ``requirements.txt`` to ``requirements.in``. | ||
* Rename ``requirements.txt`` to ``requirements.in`` and trim the contents down | ||
to only the specific project requirements you need to specify; the rest of | ||
the project requirements will be populated into ``requirements.txt`` by | ||
``pip-compile`` | ||
|
||
* Include in ``requirements.in`` a reference to this project along with all the | ||
supporting features you will use, for example:: | ||
|
||
ixc-django-docker[postgres,sentry,whitenoise,storages,compressor,celery,celery-email] | ||
|
||
**NOTE:** See this project's ``setup.py`` for a list of potential extra | ||
modules. | ||
|
||
* Add to, or update all files in, your project directory with changes from the | ||
corresponding files in the ``project_template`` directory. | ||
|
||
* Be sure to replace all occurrences of ``project_template`` in these copied | ||
files with your project name. | ||
|
||
|
||
* Configure environemnt variables | ||
|
||
* Create an ``.env.local`` file and set at least the ``DOTENV`` and | ||
``TRANSCRYPT_PASSWORD`` variables | ||
|
||
* Install ``pip-tools``:: | ||
|
||
$ pip install pip-tools | ||
|
||
* Run ``pip-compile -v``, resolving any conflicts that may arise. | ||
|
||
* Re-derive your ``requirements.txt`` file from ``requirements.in`` with:: | ||
|
||
$ pip-compile --output-file requirements.txt requirements.in | ||
|
||
This comment has been minimized.
Sorry, something went wrong.
mrmachine
Collaborator
|
||
* Make ``go.sh`` executable:: | ||
|
||
$ chmod 755 go.sh | ||
|
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,6 +1,7 @@ | ||
{ | ||
"name": "project_template", | ||
"dependencies": { | ||
"bower": "^1.8.2" | ||
}, | ||
"private": true | ||
} |
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,2 +1,2 @@ | ||
# See ``ixc_django_docker/settings/__init__.py`` for details on how base and | ||
# project settings are combined. | ||
# See https://github.com/ixc/ixc-django-docker/README.rst#composable-settings | ||
# for details on how base and project settings are combined. |
This command builds an image, not a container.
docker-compose run
runs a container in the context of an image (file system isolation). You might also want to add--pull
which ensures any base images (e.g.buildpack-deps:xenial
) are updated first, when updates are available.