DEV Community

ansango
ansango

Posted on

Directus Instance Dev

πŸš€ Automating Directus Setup for Development with Bash

Hey Devs! πŸ‘‹

I created a script to automate the setup of a Directus instance for development. If you're working with Directus and want to streamline your development workflow, this script might just save you some time!

🎯 Key Features:

  • Automatic installation of the latest Directus version.
  • Node.js 18.x compatibility check to avoid version mismatch issues.
  • SQLite database setup by default, perfect for quick dev environments.
  • Admin user creation and environment variable configuration.
  • Installs useful dev tools like nodemon and concurrently.
  • Offers extension management for Directus, allowing you to easily create and run extensions during development.

πŸ›  How It Works:

  1. Download the script to your local machine.
  2. Make it executable:
   chmod +x directus-instance-dev.sh
Enter fullscreen mode Exit fullscreen mode
  1. Run the script:
   ./directus-instance-dev.sh
Enter fullscreen mode Exit fullscreen mode
  1. Follow the prompts to configure your instance (admin user, project name, port, etc.), and you're all set!

πŸŽ‰ Why Use It?

This script handles all the repetitive setup tasks so you can focus on building instead of configuring. Whether you're just starting out with Directus or building a more complex project with extensions, it provides a clean, automated solution.

🧩 Customization

You can easily modify the script to:

  • Change the database setup.
  • Adjust environment variables.
  • Pre-install specific Directus extensions.
  • Fine-tune the dev scripts.

πŸ—£ Feedback Welcome!

Feel free to check it out, give it a spin, and share your feedback. I’m looking forward to hearing how it works for you and what can be improved!

πŸ‘‰ Get the script here!

Happy coding! πŸ’»βœ¨

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (0)

Billboard image

Detect & resolve downtimes before users even know

Trusted by Vercel, Render, LinkedIn, and thousands of teams, Checkly monitors your website or application, sends real-time alerts during downtimes, and speeds up recovery with full-stack tracing.

Start Monitoring

πŸ‘‹ Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay