Scripts for making running and deploying docker containers easy.
- Install the
@bluedot/docker-scriptsdependency in your package.json - Add the following scripts in package.json:
(if there's already a start script, use
"start": "docker-scripts start", "deploy:cd": "docker-scripts deploy",start:dockerinstead) - Create a
Dockerfilenext to your app root that exposes port 8080 as the main web service
You might also want to see the instructions in infra for adding a new service. Or see an existing app for an example.
docker-scripts start: This will run your docker container. You can then access the web service at localhost:8000.
docker-scripts deploy: This will deploy your app to production, however it's configured in infra. Specifically, it'll build your app and container, tag and push it to GitHub container registry, and bounce the k8s deployment.
website has a multistage deployment, which means it has a staging and a production environment.
To deploy to staging, use docker-scripts multistage-deploy-staging.
To deploy to production, use docker-scripts multistage-deploy-production.
No special actions needed, just follow the general developer setup instructions