Skip to content

A simple docker compose solution for local data services

License

Notifications You must be signed in to change notification settings

OB-SPrince/local-data-services

Repository files navigation

AI-Related Data-Centric Backend Services Environment

This project provides a Docker Compose setup designed for backend developers focusing on AI-related, data-centric services. It's optimized for rapid prototyping of backend APIs without the need for UI components.

Project Structure

.
├── LICENSE
├── README.md
├── config
│   ├── nginx
│   │   └── default.conf
│   ├── postgres
│   │   └── postgres.conf
│   └── redis
│       └── redis.conf
├── docker-compose.yml
├── scripts
│   └── init_db.sh
└── src
    └── app
        └── Dockerfile
  • config/: Configuration files for Nginx, PostgreSQL, and Redis services.
  • scripts/: Contains scripts for database initialization or migrations.
  • src/: Source code for the backend application, including the Dockerfile.

Features

  • Docker Compose: Simplifies the setup and running of multiple containerized services, including Nginx, Redis, PostgreSQL, MongoDB, and a Node.js application.
  • Configurable Services: Custom configuration files for key services to optimize performance and behavior according to project needs.
  • Rapid Prototyping: Scripts and configurations designed to fast-track the setup and initialization of databases and services for rapid backend prototyping.

Getting Started

Prerequisites

  • Docker and Docker Compose installed on your system.

Initial Setup

  1. Clone this repository to your local machine.

    git clone <repository-url>
    
  2. Navigate to the project directory.

    cd <project-directory>
    
  3. Review and customize the service configuration files under config/ as necessary for your development environment.

  4. Customize the Node.js application Dockerfile in src/app as required for your backend service.

  5. Use the scripts/init_db.sh script to initialize your databases with necessary schemas or data.

Running the Environment

To launch all configured services:

docker-compose up -d

This command starts your services in detached mode. Use the following to view logs:

docker-compose logs -f

Stopping the Environment

To stop all services and remove containers:

docker-compose down

Customization

  • Add or modify services in docker-compose.yml as needed for your project.
  • Update environment variables and configuration files to fine-tune each service.
  • Expand the src/ directory with your project's backend application code.

Security Considerations

  • Update default credentials for services before moving to production.
  • Secure your services with appropriate network rules and encryption.

Troubleshooting

  • If services fail to start, check the Docker Compose logs for specific error messages.
  • Ensure that no port conflicts occur with the host or among services.

Contributing

Contributions to improve the setup or add more features are welcome. Please fork the repository and submit a pull request with your changes.

License

This project is open-sourced under the MIT License.

About

A simple docker compose solution for local data services

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published