
Here is what these environment variables are doing: env.local to the following: NEXT_PUBLIC_DRUPAL_BASE_URL= To connect the Next.js site to our hosted Acquia ACMS instance, we’ll pre-populate the Next.js for Drupal environment variables.Ĭopy.
#Drupal hosting acquia install
Install Node packages npm install Connect Drupal So from either ` run dev` or ` run start` you’ll be able to visit on your local machine and connect to your node container. The docker commands here also connect port 3000 on your host machine to the docker instance. Keeping the container ephemeral, the docker commands below spin containers up and down for each command: # Install node dependencies.ĭocker run -it -rm -v $PWD:/usr/src/app -w /usr/src/app node:16 npm installĭocker run -it -rm -v $PWD:/usr/src/app -w /usr/src/app -p 3000:3000 node:16 npm run devĭocker run -it -rm -v $PWD:/usr/src/app -w /usr/src/app node:16 npm run buildĭocker run -it -rm -v $PWD:/usr/src/app -w /usr/src/app -p 3000:3000 node:16 npm run start With next-acms cloned on your host machine, you can now mount it to a standard node container to interact with it. If you don’t want to run Node locally and prefer to keep things in a Docker container, then this section is for you! Now skip ahead to the “ Install Node Packages” section. Option 1: Install Node directly to your local machine If you already have it installed, go ahead and skip to the next step. To use the starter kit locally, you’re going to need npm ( Node Package Manager) which will give you a Node.js engine (node) and npx ( node package execute). We’ll start with a git clone: npx create-next-app -e Setup your local machine A local machine where you have (or can install) node version 16.x (17.x will work too).Configure Next.js to use a JSON:API endpoint powered by Acquia CMS and hosted on Acquia Cloud Next.

Set up a local Next.js starter kit for Acquia CMS.This way you can focus on playing around exclusively with the Next.js starter kit. In this tutorial, you won’t set up a new Drupal site–you’ll use ours.

We will be making a stable release soon! Goal Note: This is currently an alpha stability product that is not yet formally supported by Acquia.

#Drupal hosting acquia how to
Try it out yourself! Here is a guide on how to get a local Next application quickly connected to Acquia CMS. With next-acms you get an out-of-the-box Next application that connects easily to the Acquia CMS default content model. We partnered with Chapter Three, maintainers of Next.js for Drupal, to build Next.js for Acquia CMS: a Next.js starter kit for Acquia CMS. It’s an adaptable JavaScript framework, built on top of React.js, with great support, stability, performance and security features. Next.js is a natural starting point for that. At Acquia, we’re creating a better developer experience for headless CMS.
