mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-18 19:04:51 +03:00
added mysql support in github actions
This commit is contained in:
parent
25018d5116
commit
ddcef98212
|
@ -47,19 +47,35 @@ jobs:
|
||||||
ports:
|
ports:
|
||||||
- 6379:6379
|
- 6379:6379
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
{%- if cookiecutter.database_engine == 'postgresql' %}
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:12
|
image: postgres:12
|
||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
env:
|
env:
|
||||||
POSTGRES_PASSWORD: postgres
|
POSTGRES_PASSWORD: postgres
|
||||||
|
{%- endif %}
|
||||||
|
{%- if cookiecutter.database_engine == 'mysql' %}
|
||||||
|
mysql:
|
||||||
|
image: mysql:8.0
|
||||||
|
ports:
|
||||||
|
- 3306:3306
|
||||||
|
env:
|
||||||
|
MYSQL_PASSWORD: mysql
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
env:
|
env:
|
||||||
{%- if cookiecutter.use_celery == 'y' %}
|
{%- if cookiecutter.use_celery == 'y' %}
|
||||||
CELERY_BROKER_URL: "redis://localhost:6379/0"
|
CELERY_BROKER_URL: "redis://localhost:6379/0"
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
{%- if cookiecutter.database_engine == 'postgresql' %}
|
||||||
# postgres://user:password@host:port/database
|
# postgres://user:password@host:port/database
|
||||||
DATABASE_URL: "postgres://postgres:postgres@localhost:5432/postgres"
|
DATABASE_URL: "postgres://postgres:postgres@localhost:5432/postgres"
|
||||||
|
{%- endif %}
|
||||||
|
{%- if cookiecutter.database_engine == 'mysql' %}
|
||||||
|
# mysql://user:password@host:port/database
|
||||||
|
DATABASE_URL: "mysql://mysql:mysql@localhost:3306/mysql"
|
||||||
|
{%- endif %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user