From c0390f4b980bccbdebce1d0b0de7216f1dd4f2d4 Mon Sep 17 00:00:00 2001 From: biersoeckli Date: Wed, 18 Dec 2024 16:49:38 +0000 Subject: [PATCH] setup pipeline for Github Actions --- .github/workflows/build-release.yml | 60 +++++++++++++++++++++++++++++ .github/workflows/tests.yml | 28 ++++++++++++++ .gitlab-ci.yml | 18 --------- README.md | 56 +++++++++++++-------------- 4 files changed, 115 insertions(+), 47 deletions(-) create mode 100644 .github/workflows/build-release.yml create mode 100644 .github/workflows/tests.yml delete mode 100644 .gitlab-ci.yml diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml new file mode 100644 index 0000000..f5e4edc --- /dev/null +++ b/.github/workflows/build-release.yml @@ -0,0 +1,60 @@ +name: Build and Push Docker Image + +on: + workflow_dispatch: + release: + types: [released, prereleased] + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '18.x' + registry-url: 'https://registry.npmjs.org' + + - name: Install dependencies for backend + run: yarn install && yarn run prisma-generate + + - name: Run tests for backend + run: yarn test + + build-and-push: + runs-on: ubuntu-latest + needs: test + if: ${{ needs.test.result == 'success' }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + registry: docker.io + username: ${{ secrets.REGISTRY_USER }} + password: ${{ secrets.REGISTRY_PASSWORD }} + + - name: Build and Push Docker Image + uses: docker/build-push-action@v4 + with: + context: ./ + push: true + platforms: linux/amd64 #,linux/arm64 + build-args: | + VERSION_ARG=${{ github.ref_name }} + tags: | + quickstack/quickstack:latest +# quickstack/quickstack:${{ github.ref_name }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..e6d6e50 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,28 @@ +name: Test on Beta Push + +on: + workflow_dispatch: + pull_request: + branches: + - main + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '18.x' + registry-url: 'https://registry.npmjs.org' + + - name: Install dependencies for backend + run: yarn install && yarn run prisma-generate + + - name: Run tests for backend + run: yarn test diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index aa50388..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,18 +0,0 @@ -stages: - - publish - -publish-docker-container: - image: docker:latest - stage: publish - services: - - docker:dind - before_script: - - docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASSWORD" - script: - - | - docker build -t "quickstack/quickstack:latest" . - docker push "quickstack/quickstack:latest" -# docker build --pull -t "$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME:$CI_COMMIT_TAG" . -# docker push "$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME:$CI_COMMIT_TAG" - rules: - - if: $CI_COMMIT_TAG # Runs the job only when a tag is created \ No newline at end of file diff --git a/README.md b/README.md index c403366..ae3d2cd 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,34 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). +# QuickStack + +QuickStack is a open source self-hosted Platform-as-a-Service (PaaS) solution designed to simplify the management of containerized applications on Virtual Private Server (VPS) infrastructures. +Developed as part of a student project at the [Eastern Switzerland University of Applied Sciences](https://ost.ch/), QuickStack provides a cost-effective alternative to commercial cloud PaaS offerings like Vercel, Digital Ocean App Platform or Azure App Service. + +## Key Features + +* **Simple Installation:** Deploy QuickStack on a VPS with a single command. +* **Git Integration:** Deploy applications directly from public or private Git repositories. +* **Live Logging:** Debug running containers with live log streams. +* **Web Terminal:** Access a web-based terminal directly within the container for debugging. +* **SSL Certificate Management:** Automatic SSL certificate generation via Let's Encrypt. +* **Resource Management:** Set resource limits (CPU, RAM, storage) for each application. +* **Monitoring Dashboard:** Track resource consumption and application performance. +* **Persistent Storage:** Attach persistent storage volumes to applications using Longhorn. +* **Cluster Support:** Scale applications across multiple VPS nodes using Kubernetes. ## Getting Started +### Prerequisites +Before getting started, ensure that you have: +* A new virtual private server (VPS) running a Linux distribution (Ubuntu preferred). -First, run the development server: - +### Installation +1. **Connect to your VPS via SSH.** +2. **Run the setup script:** ```bash -npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev +curl -sfL https://get.quickstack.dev/setup.sh | sh ``` -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. +## Contributing +Contributions are welcome! If you have ideas for new features or find bugs, please submit an issue or pull request. -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. - -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. +## License +This project is licensed under the GPL-3.0 license. \ No newline at end of file