Skip to content

sourcetown/devstack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Local Development Setup

This repository contains the local development setup for the project. Follow these instructions to get started.

Prerequisites

  • Docker and Docker Compose
  • Make
  • mkcert for local SSL certificates
  • Git

Initial Setup

  1. Install mkcert and set up local CA:
# On macOS with Homebrew

brew install mkcert
mkcert -install

# On Ubuntu/Debian

sudo apt install mkcert
mkcert -install
  1. Clone this repository:
git clone <this-repo-url> project-setup
cd project-setup
  1. Create and configure your environment:
cp .env.example .env

Edit the '.env' file and set:

  • 'PROJECT_NAME': Your project name (used for container names and domains)
  • 'REPO_URL': Your project's Git repository URL
  • 'DOMAIN_PREFIX': Domain prefix for local development
  1. Run the setup:
make setup

Available Commands

make setup # Initial project setup
make start # Start the Docker containers
make stop # Stop the Docker containers
make reset-db # Reset and seed the database
make clear-cache # Clear application caches
make reset-certs # Generate new SSL certificates
make sort-proxy # Configure trusted proxies

SSL Certificates

The project uses mkcert for local SSL certificates. The certificates are automatically generated during setup for the following domains:

  • '${PROJECT_NAME}.dev'
  • 'api.${PROJECT_NAME}.dev'
  • 'platform.${PROJECT_NAME}.dev'
  • 'dev-platform.${PROJECT_NAME}.dev'

To regenerate certificates manually, run:

make reset-certs

Troubleshooting

  1. If you see certificate errors:

    • Ensure mkcert is installed and initialized ('mkcert -install')
    • Try regenerating certificates with 'make reset-certs'
  2. If the setup fails:

    • Check your .env configuration
    • Ensure Docker is running
    • Check if the repository URL is accessible

Directory Structure

The setup expects the following directory structure:

parent-directory/
├── project-setup/ # This repository
└── ${PROJECT_NAME}/ # Your main project repository

Environment Variables

Your '.env' file should contain:

PROJECT_NAME=project-name # Name of your project
REPO_URL= # Your Git repository URL
DOMAIN_PREFIX=project-name.dev # Domain prefix for local development

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors