A Docker environment generator for Next.js.
The main idea behind this tool is to have an automatic way to generate Next.js environments for development, but also for production. To support this, Traefik has been included to the tech stack, enabling SSL termination and simplifying the generation of SSL certificates for live sites.
Note
It will continue improving to add other relevant services to the tech stack like SMTP, database, etc. They will be ready to use to facilitate the release of complex apps/developments.
It is worth mentioning that this tool was inspired by the following excellent project that achieves similar goals:
Before using this tool, ensure that you have:
-
User with
sudo
privileges. -
Git installed on your system.
Note
It is required a user with sudo
privileges to install required dependencies (check this and this), but also to update the /etc/hosts
file with local domain that will be used for development.
To install this tool, run the following command:
git clone https://github.com/d3p1/docknext.git && \
chmod +x docknext/src/bin/setup/installer.sh && \
./docknext/src/bin/setup/installer.sh && \
source ~/.bash_profile && \
rm -rf docknext/
Using this tool is straightforward:
-
Create a
.docknext_profile
file. This file lets you configure environment variables that define how the project environment should be generated. -
Execute
docknext init
to generate the necessary Docker Compose files for the project. -
Execute
docknext next-install
if you want to install a new Next.js platform to work with the current generated environment. Or executedocknext next-configure
if you want to configure an existing Next.js project to work with the current environment. -
Execute
docknext ide-configure
to simplify the configuration of your IDE, allowing you to work with this generated environment efficiently and effectively.
Important
For now, docknext ide-configure
only installs startup scripts that are very useful for WebStorm. However, automating the configuration of other important aspects and supporting additional IDEs is still pending. This ticket will handle the completion of this requirement.
Note
To gain a deeper understanding of how this tool works under the hood, visit the wiki page (currently, in progress).
Note
If you encounter issues while using this tool, refer to the troubleshooting page for guidance (currently, in progress).
Important
Please note that as of now, this tool has only been tested on Debian 12
and requires an environment with bash
to function correctly.
Detailed changes for each release are documented in CHANGELOG.md
.
This work is published under MIT License.
Always happy to receive a greeting on: