This is a build guide to help walk you through setting up a new Next.js project.
npm install -g tiged
Clone this repository using Tiged/Degit.
degit --mode=git git@github.com:forumone/nextjs-project.git [project-name]
Note: If you have an issue with that command try without the --mode=git
option
Initialize the new project as a Git repository.
cd [project-name]
git init
Add the git remote for the new repository.
git remote add origin git@github.com:forumone/[project-name].git
Update configuration in the ./.ddev/config.yaml
. Update name: nextjs-project
to the correct project name.
If you are setting up a headless Drupal project, continue with the setup steps in /starterkits/drupal/README.md.
Please remove:
./.storybook
./package.json
, remove
...
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
...
package.json
npm i --package-lock-only
Please delete: ./github
folder.
environment variables
?.buildkite
, please delete
...
- seek-oss/aws-sm#v2.0.0:
file:
- path: .env
secret-id: [NEED THIS CONFIGURED]
...
./buildkite/pipeline-base.yaml
> .buildkite/pipeline.yaml
halp
request in to get a secrets manager
setup for the project. (This may change in the future).env
are needed to put into secrets manager..buildkite/pipeline-base.yml
> will need to update: [NEED THIS CONFIGURED]
tobe updated.
Configuring Capistrano deployments requires editing of the following files:
capistrano/deploy.rb
capistrano/deploy/dev.rb
capistrano/deploy/stage.rb
capistrano/deploy/prod.rb
If additional environments are required you can copy capistrano/deploy/dev.rb
to a new stage file and make the required changes.
capistrano/deploy.rb
Configuring the general deployment settings happens in capistrano/deploy.rb
and requires replacing the
following placeholder tokens in the settings:
APP_NAME
This is simply a name for the application that will be used as a directory name. Replace it with a relevant string to be used to identify your application.
HTTPS_REPO_URL
This should be the HTTPS clone URL for your repo to be deployed. You may access this from the GitHub UI.
capistrano/deploy/<dev|stage|prod>.rb
The files located at capistrano/deploy/*.rb
define deployment targets for the application to be released to.
For each environment the application is being deployed to there should be one matching file with the
environment-specific configuration defined. To create a new deployment environment, the
capistrano/deploy/dev.rb
file may be duplicated and renamed to match the name of the new environment. Then
the same configuration process described below should be followed by customizing each of the following tokens
in the file settings:
stage
The stage name should match that of the containing file. For example, the dev.rb
file should set this to :dev
.
SITE_URL
This is the URL used to access the site being deployed.
ENVIRONMENT_NAME
This is the name of the environment's vhost directory where the application will be deployed to. Usually this
is a combination of a short application name followed by the environment name, e.g., nextjs.dev
. By replacing
this token in the full path, the setting would look like this:
# The path to the project on the server
set :deploy_to, '/var/www/vhosts/nextjs.dev'
BRANCH
This is the specific git branch to be deployed to this environment from the repository. Typically these follow the pattern in the following table.
Environment | Branch |
---|---|
dev | integration |
stage | main |
prod | live |
SERVER_LOGIN
This defines the servers to be deployed to and the logins to be used for access. In most use cases, each instance of this token will use the same login. An example login would look like:
# Simple Role Syntax
# ==================
# Supports bulk-adding hosts to roles, the primary
# server in each group is considered to be the first
# unless any hosts have the primary property set.
role :app, %w{wordpress@wordpress.byf1.dev}, :primary => true
role :web, %w{wordpress@wordpress.byf1.dev}
role :db, %w{wordpress@wordpress.byf1.dev}
Remove this README.md
file and rename the README.project.md
file to README.md
. Update the README.md
with the correct details for your projects. Take note of the Project Name at the top as well as the Buildkite badge setup. (Note: The Buildkite build status badge can be found in the Buildkite pipeline settings online.)