/nextjs-devcontainer

🐋 Fully-Dockerised Nextjs - postgress development in Visual Studio Code

Primary LanguageDockerfileMIT LicenseMIT

nextjs-devcontainer

🐋 Fully-Dockerised Nextjs - postgress development in Visual Studio Code

Next.js & Postgress Development Containers for Visual Studio Code

nextjs-devcontainer is a simple configuration to support fully-dockerised development of Next.js applications using Visual Studio Code.

nextjs-devcontainer currently ships with:

  • postgres:14.1-alpine workspace container
  • node:latest for the app

Easy Installation

Using this configuration is quite simple. Download and place nextjs-devcontainer in a .devcontainer folder with your Laravel Code. If starting a new project, you may create a new folder with just larave-devcontainer in your .devcontainer folder.

Installing Using Git Submodules

Alternatively, you may use Git Submodules. Install the configuration by running

git submodule add https://github.com/DanielRondonGarcia/nextjs-devcontainer .devcontainer

If you use this method, do not forget to install submodules when cloning:

git clone --recurse-submodules ...

Usage

Start Visual Studio Code (e.g. code example-app) and re-open in remote containers (Remote-Containers: Reopen in Container). This may take some time on the first use, as Docker initially downloads and builds the images. Eventually, Visual Studio Code will run inside the workspace container. Extensions and settings specified in devcontainer.json will be auto-configured!

Be sure to correctly configure your application .env to use the devcontainer postgres.

Extensions

nextjs-devcontainer currently ships with the following extensions for Laravel development in Visual Studio Code: