This repository provides a customizable starter template for development projects using both Gitpod and VS Code environments. It is pre-configured with tools like Node.js, Python, PostgreSQL, MongoDB, and Heroku, and includes useful scripts to streamline development.
- Ready-to-use in Gitpod and VS Code.
- Supports Node.js, Python (with virtual environments), PostgreSQL, MongoDB, and Heroku CLI.
- Pre-configured VS Code settings and Gitpod tasks.
- Includes Python linting, code formatting, and additional tools.
- Easy-to-use custom aliases for frequently used commands.
-
Open the Repository in Gitpod:
-
You can directly open the repository in Gitpod by navigating to the repository page and clicking the Gitpod button (if you have the Gitpod browser extension installed) or by prepending
gitpod.io/#to the repo URL.https://gitpod.io/#https://github.com/yourusername/jaqi-vscode-project-starter
-
-
Automatic Setup:
- The
.gitpod.ymland.gitpod.dockerfileare configured to automatically set up your development environment. This includes:- Installing Node.js, Python, PostgreSQL, MongoDB, and Heroku CLI.
- Creating a virtual environment for Python.
- Installing all Python dependencies from
requirements.txt.
- The
-
Starting the Project:
-
Run the Django development server:
python3 manage.py runserver 0.0.0.0:8000
-
You can use pre-configured aliases, such as:
run # Alias for running the Django development server
-
-
PostgreSQL & MongoDB:
- PostgreSQL and MongoDB are pre-installed and can be started automatically.
- The alias
set_pgconfigures thePGHOSTADDRenvironment variable for PostgreSQL.
-
Clone the Repository:
-
Clone the repository to your local machine:
git clone https://github.com/yourusername/jaqi-vscode-project-starter.git cd jaqi-vscode-project-starter
-
-
Python Virtual Environment Setup:
-
Create a virtual environment (if you’re using Python):
python3 -m venv env source env/bin/activate
-
-
Install Dependencies:
-
Install Python dependencies:
pip install -r requirements.txt
-
-
VS Code Configuration:
- This repository includes pre-configured VS Code settings and debugging configurations for Django:
- Open the repository folder in VS Code.
- Use the
launch.jsonfile to run and debug the Django app by pressingF5or clicking the green "play" button.
- This repository includes pre-configured VS Code settings and debugging configurations for Django:
-
Custom Aliases:
-
If you wish to use the custom aliases (like
runfor starting Django), add the following to your.bashrcor.zshrc:alias run="python3 manage.py runserver 0.0.0.0:8000"
-
project-root/
├── .gitpod.yml # Gitpod tasks and extensions configuration
├── .gitpod.dockerfile # Dockerfile to set up the Gitpod environment
├── .vscode/ # VS Code settings for the project
│ ├── settings.json # Formatting and editor settings
│ ├── launch.json # Debug configurations for Django
│ ├── extensions.json # Recommended VS Code extensions
│ ├── init_tasks.sh # Initialization script (e.g., for SQLite, virtualenv)
│ ├── repo_updater.py # Script for repository migrations and updates
│ ├── uptime.sh # Script to track uptime and monitor basic stats
│ ├── heroku_config.sh # Script to configure Heroku API key
│ └── make_url.py # Utility for creating Cloudinary URLs from config
├── requirements.txt # Python dependencies
├── manage.py # Django entry point
├── README.md # This file
├── .gitignore # Ignored files and directories
└── ... # Other project filesThis project includes several useful scripts and aliases for Gitpod users and developers:
- repo_updater.py: A Python script to help with migration tasks or repository version control updates.
- heroku_config.sh: Configures your Heroku CLI with your API key.
- Custom Aliases:
- run: Alias to run the Django server.
- set_pg: Configures PostgreSQL's
PGHOSTADDRvariable. - mongo: Alias for running MongoDB shell commands.
These extensions will be automatically installed in Gitpod and are recommended for VS Code users:
- Python (
ms-python.python): For Python development. - Auto Close Tag (
formulahendry.auto-close-tag): Automatically close HTML tags. - Beautify (
hookyqr.beautify): Code formatter for HTML, CSS, and JavaScript. - Bootstrap 4 CDN Snippets (
eventyret.bootstrap-4-cdn-snippet): Quick Bootstrap 4 snippets. - Jupyter (
ms-toolsai.jupyter): Jupyter notebook support in VS Code.
- Fork the repository.
- Make your changes.
- Open a pull request!
- Ensure that you are using the correct aliases and environment variables to start and configure the databases.