Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: development environment setup during the docker build process #2197

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

Ramy-Badr-Ahmed
Copy link

@Ramy-Badr-Ahmed Ramy-Badr-Ahmed commented Oct 5, 2024

This PR implements several improvements to the Chemotion ELN development environment for a dynamic build-up process:

  • Added database preparation script prepare_database.sh:

    • Renames the exisiting configuration files (e.g., database.yml, shrine.yml, storage.yml, datacollectors.sh), it prevents failures in the rake db:setup process.
    • Checks existing pending migrations via db:migrate:status return for down.
  • Added database migration step in prepare-ruby-dev.sh before starting the Rails server. This prevents ActiveRecord::PendingMigrationError due to pending migrations on server startup.

  • Changes to Dockerfile.chemotion-dev:

    • Added dependency: jq.
    • Set GEM in PATH.
    • Added bundle & gem installation before prepare-rubygems.sh.
    • Created node_module directory as root then changed ownership.
    • Restyled Dockerfile.chemotion-dev file.
  • Shell Script Line Ending Management:

    • Added a .gitattributes file to enforce LF line endings for shell scripts and .tool-versions (prevent issues with CRLF line endings across different OS).
    • Updated docker-compose.dev.yml to ensure shell scripts are checked and converted to LF line endings before execution as expected by Docker.
  • Changed Webpacker service to reference .env.development instead of .env

  • Synchronise dynamically engines.node in package.json with REQUIRED_NODE_VERSION to avoid yarn failure during js package installation.

Copy link
Author

@Ramy-Badr-Ahmed Ramy-Badr-Ahmed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my forked version:

Continuous Integration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant