{"id":29820401,"url":"https://github.com/aryakvn/django-vue-docker-compose","last_synced_at":"2026-04-06T21:32:50.233Z","repository":{"id":305155155,"uuid":"1021023690","full_name":"aryakvn/django-vue-docker-compose","owner":"aryakvn","description":"A Sample template for django + vue + nginx + postgresql docker-compose with auto deploy using github actions","archived":false,"fork":false,"pushed_at":"2025-07-19T08:59:37.000Z","size":23,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-28T23:03:49.103Z","etag":null,"topics":["celery","django","docker","docker-compose","github-actions","nginx","postgresql","redis","vuejs"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aryakvn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-16T18:55:04.000Z","updated_at":"2025-07-21T14:13:03.000Z","dependencies_parsed_at":"2025-07-18T17:11:37.777Z","dependency_job_id":"14a8cecc-2dd5-4559-96da-48894a8bd7fe","html_url":"https://github.com/aryakvn/django-vue-docker-compose","commit_stats":null,"previous_names":["aryakvn/django-vue-docker-compose"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aryakvn/django-vue-docker-compose","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aryakvn%2Fdjango-vue-docker-compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aryakvn%2Fdjango-vue-docker-compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aryakvn%2Fdjango-vue-docker-compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aryakvn%2Fdjango-vue-docker-compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aryakvn","download_url":"https://codeload.github.com/aryakvn/django-vue-docker-compose/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aryakvn%2Fdjango-vue-docker-compose/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31491097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T17:22:55.647Z","status":"ssl_error","status_checked_at":"2026-04-06T17:22:54.741Z","response_time":112,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["celery","django","docker","docker-compose","github-actions","nginx","postgresql","redis","vuejs"],"created_at":"2025-07-28T23:00:52.665Z","updated_at":"2026-04-06T21:32:50.226Z","avatar_url":"https://github.com/aryakvn.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django + Vue + Nginx + Docker\nA simple template to setup your next django \u0026 vue.js project and deploy it using docker-compose with CI/CD using github actions. To use this project simply create a django project named ``backend`` in the ``backend`` directory and copy your vue.js frontend to ``frontend`` directory. \n\n### Folder structure\n\n```\n├── docker-compose.yml\n|\n├── backend\n│   ├── docker-entrypoint.sh\n│   └── Dockerfile\n|\n├── frontend\n│   └── Dockerfile\n|\n└── nginx\n    ├── cert.pem\n    ├── default.conf\n    ├── Dockerfile\n    └── key.pem\n```\n- ``backend``: Django application\n- ``frontend``: Vue.js application\n- ``nginx``: Nginx configuration and SSL certificates\n- ``docker-compose.yml``: Docker Compose file to run the entire stack\n\n### Usage\n1. **Build and run the containers**:\n   ```bash\n   docker-compose up --build\n   ```\n\n2. **Access the applications**:\n    - Django backend: [http://localhost:8000](http://localhost:8000)\n    - Vue.js frontend: [http://localhost:8080](http://localhost:8080)\n\n3. **Stop the containers**:\n    ```bash\n    docker-compose down\n    ```\n\n### Redis\nIf you want to use Redis for caching or session management, you can uncomment the ``redis`` service from the `docker-compose.yml` file:\n\n```yaml\n  redis:\n    image: redis:7\n    volumes:\n      - redis_data:/data\n    healthcheck:\n      test: [ \"CMD\", \"redis-cli\", \"ping\" ]\n      interval: 5s\n      timeout: 5s\n      retries: 5\n```\n\n**Note**: Make sure to uncomment healthchecks and dependency links in the ``backend`` service if you enable Redis.\n\n### Celery\nIf you want to use Celery for background tasks, you can uncomment the ``celery`` service from the `docker-compose.yml` file:\n\n```yaml\n  celery:\n    image: python:3.11\n    command: bash -c \"pip install -r requirements.txt \u0026\u0026 celery -A backend worker -l INFO\"\n    working_dir: /app\n    volumes:\n      - ./backend:/app\n    env_file:\n      - .env\n\n    depends_on:\n      - backend\n      - redis\n      - postgres\n```\n\n### SSL\nIf you want to use SSL, ensure you have your `cert.pem` and `key.pem` files in the `nginx` directory. The Nginx configuration is set up to use these files for HTTPS.\n\nYou could generate self-signed certificates for local development using the following command:\n\n```bash\nopenssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout nginx/key.pem -out nginx/cert.pem\n``` \n\n### API Routes\n- ``/`` - Vue.js frontend\n- ``/api`` - Django API endpoint\n- ``/admin`` - Django admin interface\n- ``/static`` - Static files collected by Django\n- ``/media`` - Media files uploaded by users\n- ``/ws`` - WebSocket endpoint for real-time features (if implemented)\n\n### Environment Variables\nYou can set environment variables for the Django backend in the `docker-compose.yml` file under the `backend` service. For example:\n\n```yaml\nenvironment:\n    - DJANGO_SETTINGS_MODULE=backend.settings\n    - DATABASE_URL=postgres://USER:PASSWORD@postgres:5432/DATABASE\n    - REDIS_URL=redis://redis:6379/0\n```\n\n### CI/CD - Github Actions\nDefine the following secrets in your repository by navigating to ``Settings`` \u003e ``Secrets and Variables`` \u003e ``New Secret``.\n\n```bash\nSSH_HOST=\nSSH_USER=\nSSH_PASSWORD=\nDEPLOY_PATH=\n```\n\n### Notes\n- Ensure Docker and Docker Compose are installed on your machine.\n- The Nginx configuration is set up to serve both the Django backend and Vue.js frontend\n- SSL certificates are included for HTTPS support. Replace `cert.pem` and `key.pem` with your own certificates if needed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faryakvn%2Fdjango-vue-docker-compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faryakvn%2Fdjango-vue-docker-compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faryakvn%2Fdjango-vue-docker-compose/lists"}