eronka / culero-api

Open source alternative to LinkedIn
https://www.culero.com
14 stars 11 forks source link

test: docker build and docker run workflows #124

Closed thesarfo closed 2 months ago

thesarfo commented 4 months ago

Improve Docker build process and CI workflow

Referred Issue - #66

Description

I introduced several changes to optimize the Docker build process, enhance the CI workflow, and improve overall project consistency.

Changes made:

  1. Modified Dockerfile:

    • Optimized the build process for better consistency and reliability.
    • Updated dependency installation and pruning steps.
  2. Updated .github/workflows/ci.yml:

    • Added steps in the CI workflow to incorporate Docker build and run tests.
  3. Modified package.json:

    • Added new scripts related to Docker testing.
    • Updated dependencies or scripts as needed for the new Docker workflow.
  4. Added .dockerignore:

    • Created a new .dockerignore file to exclude unnecessary files from the Docker build context, optimizing build time and image size
  5. Added test-docker.sh:

    • Created a new shell script to automate Docker build and run tests.
Testing

I have tested these changes locally. The Docker image builds successfully, and the new test script runs without errors. The updated CI workflow has been verified to work as expected.