HasithDeAlwis / Hasith-Portfolio-v2

Version two of my portfolio
0 stars 0 forks source link

20/hasith/build/dockerize website and payload server #24

Closed HasithDeAlwis closed 2 months ago

HasithDeAlwis commented 2 months ago

Summary by Sourcery

Dockerize the website and payload server by adding Docker Compose configurations for different environments and implementing database migrations for the payload server.

New Features:

Enhancements:

Deployment:

netlify[bot] commented 2 months ago

Deploy Preview for hasith failed. Why did it fail? →

Name Link
Latest commit 8d18a23e415d776e886e5e6a80df19f1731ff4dd
Latest deploy log https://app.netlify.com/sites/hasith/deploys/66efa9e61b987f0008009f72
sourcery-ai[bot] commented 2 months ago

Reviewer's Guide by Sourcery

This pull request focuses on dockerizing the website and payload server. It introduces Docker configurations for development, production, and deployment environments. The changes include updating dependencies, modifying the payload configuration, adding database migrations, and creating Docker Compose files for different environments.

File-Level Changes

Change Details Files
Updated dependencies and configurations
  • Added esbuild dependency to the root project
  • Removed esbuild dependency from a sub-project
  • Removed CPU architecture specification for libsql package
  • Fixed environment variable names for CORS and CSRF whitelist origins
  • Updated migration directory path based on the environment
pnpm-lock.yaml
apps/payload/src/payload.config.ts
Added database migrations
  • Created initial database schema for users, currently_learning, payload_preferences, and payload_migrations tables
  • Implemented up and down migration functions
  • Added indexes and foreign key constraints
apps/payload/src/migrations/20240921_150311.json
apps/payload/src/migrations/20240921_150311.ts
Created Docker Compose configurations for different environments
  • Added production Docker Compose file with services for database, CMS app, and website
  • Created deployment Docker Compose file using pre-built images
  • Added development Docker Compose file for the database service
docker-compose.prod.yml
docker-compose.deploy.yml
docker-compose.dev.yml

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.