You can integrate any custom docker in your deployment.
Create a custom service
In the interface, click add, choose "custom", add a service and validate. You can then find the service bound to your git repository.
Integrate with the webcapsule CI/CD
Checkout your environment
By default, webcapsule has the following branche mapping :
- staging environment :
WBCE_staging
branch - production environment :
WBCE_prod
branch
Create a Dockerfile in your git
- Add a dockerfile at the root of your project
- You may customize the Dockerfile to your requirements.
- Ensure that the exposed container port map the kubernetes service port. By default, webcapsule will assume port 80 is exposed by your container, but you can modify this port number if needed. If you want to do this, go to infisical, and modify the value of this path : > name of your project > environment you target > name of your service > input > PORT
(optional) Build script
Webcapsule checks for the presence of a package.json file. If found, the following commands will be executed:
-
npm install
-
the first script that exists from the following order:
npm run wbce-build
npm run build
npm run build-front
- The Docker build process will then be initiated.