mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-25 11:04:04 +03:00
switch to named docker volumes
This commit is contained in:
parent
c521458928
commit
0954ec8dad
|
@ -2,6 +2,10 @@
|
|||
All enhancements and patches to cookiecutter-django will be documented in this file.
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
### [2016-04-08]
|
||||
### Changed
|
||||
- Move to named docker volumes (@jayfk)
|
||||
|
||||
### [2016-04-07]
|
||||
### Changed
|
||||
- Pycharm Support (including debugging in Docker) @noisy
|
||||
|
|
|
@ -41,7 +41,7 @@ This pass all incoming requests on `nginx-proxy`_ to the nginx service your appl
|
|||
|
||||
.. _nginx-proxy: https://github.com/jwilder/nginx-proxy
|
||||
|
||||
Postgres is saving its database files to `/data/{{cookiecutter.repo_name}}/postgres` by default. Change that if you wan't
|
||||
Postgres is saving its database files to the `postgres_data` volume by default. Change that if you wan't
|
||||
something else and make sure to make backups since this is not done automatically.
|
||||
|
||||
To get started, pull your code from source control (don't forget the `.env` file) and change to your projects root
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
version: '2'
|
||||
|
||||
volumes:
|
||||
postgres_data_dev: {}
|
||||
postgres_backup_dev: {}
|
||||
|
||||
services:
|
||||
postgres:
|
||||
build: ./compose/postgres
|
||||
volumes:
|
||||
# If you are using boot2docker, postgres data has to live in the VM for now until #581 is fixed
|
||||
# for more info see here: https://github.com/boot2docker/boot2docker/issues/581
|
||||
- /data/dev/{{cookiecutter.repo_name}}/postgres:/var/lib/postgresql/data
|
||||
- /data/dev/{{cookiecutter.repo_name}}/postgres-backups:/backups
|
||||
- postgres_data_dev:/var/lib/postgresql/data
|
||||
- postgres_backup_dev:/backups
|
||||
environment:
|
||||
- POSTGRES_USER={{cookiecutter.repo_name}}
|
||||
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
version: '2'
|
||||
|
||||
volumes:
|
||||
postgres_data: {}
|
||||
postgres_backup: {}
|
||||
|
||||
services:
|
||||
postgres:
|
||||
build: ./compose/postgres
|
||||
volumes:
|
||||
- /data/{{cookiecutter.repo_name}}/postgres:/var/lib/postgresql/data
|
||||
- /data/{{cookiecutter.repo_name}}/postgres-backups:/backups
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
- postgres_backup:/backups
|
||||
env_file: .env
|
||||
|
||||
django:
|
||||
|
|
Loading…
Reference in New Issue
Block a user