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