This project is containerized using Docker and can be deployed using GitHub Actions CI/CD.
- Docker
- Docker Compose
To run the application in development mode with hot-reloading:
docker-compose up devThis will start the application in development mode on http://localhost:3000.
To build and run the application in production mode:
docker-compose up prodThis will build the application and start it in production mode on http://localhost:3000.
docker build -t roundmap:dev -f Dockerfile.dev .
docker run -p 3000:3000 -v $(pwd):/app -v /app/node_modules roundmap:devdocker build -t roundmap:latest .
docker run -p 3000:3000 roundmap:latestThis project uses GitHub Actions for continuous integration and deployment. The workflow is defined in .github/workflows/docker-deploy.yml.
- When you push to the
mainbranch, GitHub Actions will:- Build the Docker image
- Push it to GitHub Container Registry (ghcr.io)
- Deploy it to your production server
The GitHub Actions workflow has been configured to deploy to a server. To make this work:
-
Add the following secrets to your GitHub repository:
SSH_HOST: IP address of the serverSSH_USER: Username to access the serverSSH_PRIVATE_KEY: Your private SSH key for accessing the serverSSH_KNOWN_HOSTS: The SSH known hosts entry for your server (runssh-keyscan ${SSH_HOST}to generate)
-
The workflow will:
- Build the Docker image
- Push it to GitHub Container Registry (ghcr.io)
- SSH into your server
- Pull the latest image
- Stop and remove any existing container
- Start a new container with the latest image
- Clean up old images