mirror of https://github.com/snachodog/mybuddy.git
Add `createcachetable` to deploy configurations
This commit is contained in:
parent
f4f7b8f5af
commit
e93c70bf2c
|
@ -10,13 +10,14 @@ option_settings:
|
||||||
container_commands:
|
container_commands:
|
||||||
01_pipenv_install:
|
01_pipenv_install:
|
||||||
command: 'pip install pipenv'
|
command: 'pip install pipenv'
|
||||||
02_requirments_install:
|
02_requirements_install:
|
||||||
env:
|
env:
|
||||||
LC_ALL: en_US.utf8
|
LC_ALL: en_US.utf8
|
||||||
LANG: en_US.utf8
|
LANG: en_US.utf8
|
||||||
command: 'pipenv install --system --deploy'
|
command: 'pipenv install --system --deploy'
|
||||||
03_collectstatic:
|
03_migrate:
|
||||||
command: 'python manage.py collectstatic --no-input'
|
|
||||||
04_migrate:
|
|
||||||
command: "python manage.py migrate"
|
command: "python manage.py migrate"
|
||||||
leader_only: true
|
leader_only: true
|
||||||
|
04_createcachetable:
|
||||||
|
command: "python manage.py createcachetable"
|
||||||
|
leader_only: true
|
||||||
|
|
|
@ -120,6 +120,10 @@ documentation section: [Translation](https://docs.djangoproject.com/en/3.0/topic
|
||||||
1. Migrate the database
|
1. Migrate the database
|
||||||
|
|
||||||
gulp migrate
|
gulp migrate
|
||||||
|
|
||||||
|
1. Create cache table
|
||||||
|
|
||||||
|
gulp createcachetable
|
||||||
|
|
||||||
1. Build assets and run the server
|
1. Build assets and run the server
|
||||||
|
|
||||||
|
@ -143,6 +147,7 @@ in the [`babybuddy/management/commands`](babybuddy/management/commands) folder.
|
||||||
- [`gulp collectstatic`](#collectstatic)
|
- [`gulp collectstatic`](#collectstatic)
|
||||||
- [`gulp compilemessages`](#compilemessages)
|
- [`gulp compilemessages`](#compilemessages)
|
||||||
- [`gulp coverage`](#coverage)
|
- [`gulp coverage`](#coverage)
|
||||||
|
- [`gulp createcachetable`](#createcachetable)
|
||||||
- [`gulp extras`](#extras)
|
- [`gulp extras`](#extras)
|
||||||
- [`gulp fake`](#fake)
|
- [`gulp fake`](#fake)
|
||||||
- [`gulp lint`](#lint)
|
- [`gulp lint`](#lint)
|
||||||
|
@ -192,6 +197,11 @@ for more details about other options and functionality of this command.
|
||||||
Create a test coverage report. See [`.coveragerc`](.coveragerc) for default
|
Create a test coverage report. See [`.coveragerc`](.coveragerc) for default
|
||||||
settings information.
|
settings information.
|
||||||
|
|
||||||
|
#### `createcachetable`
|
||||||
|
|
||||||
|
Executes Django's `createcachetable` management task. See [django-admin createcachetable](https://docs.djangoproject.com/en/3.0/ref/django-admin/#createcachetable)
|
||||||
|
for more details about other options and functionality of this command.
|
||||||
|
|
||||||
#### `extras`
|
#### `extras`
|
||||||
|
|
||||||
Copies "extra" files (fonts, images and server root contents) to the build
|
Copies "extra" files (fonts, images and server root contents) to the build
|
||||||
|
|
|
@ -95,9 +95,13 @@ one for the database and one for the application.
|
||||||
|
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
|
|
||||||
1. Initialize the database *(first run/after updates)*
|
1. Initialize the database *(first run/after migrations updates)*
|
||||||
|
|
||||||
docker-compose exec app python manage.py migrate
|
docker-compose exec app python manage.py migrate
|
||||||
|
|
||||||
|
1. Initialize cache table *(first run/after cache configuration updates)*
|
||||||
|
|
||||||
|
docker-compose exec app python manage.py createcachetable
|
||||||
|
|
||||||
The app should now be locally available at
|
The app should now be locally available at
|
||||||
[http://127.0.0.1:8000](http://127.0.0.1:8000). See
|
[http://127.0.0.1:8000](http://127.0.0.1:8000). See
|
||||||
|
@ -183,6 +187,7 @@ Python 3.6+, nginx, uwsgi and sqlite and should be sufficient for a few users
|
||||||
|
|
||||||
export DJANGO_SETTINGS_MODULE=babybuddy.settings.production
|
export DJANGO_SETTINGS_MODULE=babybuddy.settings.production
|
||||||
python manage.py migrate
|
python manage.py migrate
|
||||||
|
python manage.py createcachetable
|
||||||
|
|
||||||
1. Set appropriate permissions on the database and data folder
|
1. Set appropriate permissions on the database and data folder
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue