This repository includes Docker support for building and deploying the dreadwitdastacc-IFA cryptocurrency mining platform.
docker build -t dreadwitdastacc-ifa .docker run -p 8080:80 dreadwitdastacc-ifaThen visit http://localhost:8080 in your browser.
This repository is configured with GitHub Actions to automatically build and push Docker images to GitHub Container Registry (ghcr.io).
Docker images are automatically built and pushed when:
- Code is pushed to the
mainbranch - Code is pushed to any
copilot/**branch - A version tag is created (e.g.,
v1.0.0) - Manually triggered via workflow_dispatch
Images are tagged with:
latest- Latest build from the main branch<branch-name>- Latest build from a specific branchv<version>- Semantic version tags (e.g.,v1.0.0,v1.0,v1)<branch>-<sha>- Specific commit SHA
Replace <owner>/<repo> with your GitHub username and repository name:
# Pull the latest image
docker pull ghcr.io/<owner>/<repo>:latest
# Pull a specific version
docker pull ghcr.io/<owner>/<repo>:v1.0.0
# Run the pulled image
docker run -p 8080:80 ghcr.io/<owner>/<repo>:latestFor this repository: ghcr.io/dreadwitdastacc-ifa/codespaces-react
The GitHub Actions workflow builds images for multiple platforms:
- linux/amd64 (x86_64)
- linux/arm64 (ARM 64-bit, including Apple Silicon)
The Dockerfile uses a multi-stage build:
- Builder Stage: Uses Node.js 18 Alpine to install dependencies and build the React application
- Production Stage: Uses Nginx Alpine to serve the built static files
The container includes a health check that verifies nginx is running every 30 seconds.
Currently, no environment variables are required. The app uses the homepage URL configured in package.json.
To customize the nginx configuration, uncomment the nginx.conf copy line in the Dockerfile and create a custom nginx.conf file.
If the container fails to start:
# Check container logs
docker logs <container-id>
# Check health status
docker inspect --format='{{.State.Health.Status}}' <container-id>