Deployment¶
We will be using several environments:
Staging environment¶
On this environment, we don't use Docker and deploy directly to Vercel in order to ease the development experience during the development phase.
Prerequisite¶
You need to add a remote to your git repository:
We performed a fork of Geotrek-rando on a personal account to benefit from Vercel free tier.
Deploy¶
The staging deployment is automated upon pushing on the Vercel remote. Therefore you can deploy the current available version on the main
branch by:
- Pulling the latest
main
branch fromorigin
:
- Pushing it to the Vercel remote:
Production environment¶
We deploy a new packaged image on the registry.
Prerequisite¶
You need to have Docker installed.
You need to have access to the GeotrekCE
organization.
You need to have permissions on the Geotrek-rando-v3 packages -> go to this url.
Build the image¶
- Merge all the changes you want to include on the
main
branch - Check the number of the current version on the package repository
- Checkout
main
locally and pull cd frontend
- Build the new image The "t" option is used to tag the image
Deploy to the Geotrek registry¶
First you'll need to have a Github personal access token with access permission to create packages. See this documentation if you don't manage to do it on your own.
-
Push the new image on the Github package repository
-
Go on the package repository to check that the new image is online
Pull the container on your machine and run it¶
Follow the steps described in the install on your own machine documentation.