Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danihodovic/ansible-role-django
https://github.com/danihodovic/ansible-role-django
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/danihodovic/ansible-role-django
- Owner: danihodovic
- Created: 2020-12-08T17:19:19.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-10-11T12:20:55.000Z (about 3 years ago)
- Last Synced: 2024-05-14T00:33:07.745Z (6 months ago)
- Language: Python
- Size: 35.2 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ansible-role-django [![Build Status](https://ci.depode.com/api/badges/danihodovic/ansible-role-django/status.svg)](https://ci.depode.com/danihodovic/ansible-role-django)
Deploys Django as a Docker container
Example playbook
```yaml
- name: Deploy django app
hosts: main
tasks:
- name: Clone my Django repository
git:
repo: >-
https://{{ my_gitlab_deployment_user }}:{{ my_gitlab_deployment_token }}@gitlab.com/organization/my_website.git
dest: /opt/my_website
depth: 1- name: Deploy app
import_role:
name: ansible-role-django
vars:
django_dir: /opt/my_website/
django_container:
name: my_website
env:
DJANGO_SECRET_KEY: '{{ vault_my_website_django_secret_key }}'
DJANGO_ADMIN_URL: secret-admin-url
DATABASE_URL: 'postgres://{{ postgres_user }}:{{ vault_postgres_password }}@postgres/my_database'
networks:
- name: nginx
- name: db
```