Skip to content

[Documentation] - Installating the Validation Service on Windows #279

@gmn3DS

Description

@gmn3DS

Hello,

I have installed the validation service on Windows and wanted to share the hardships I encountered as I was little familiar with Git and even less with Docker.

So this post is less an issue itself and more of additional documentation.

Clone the repository

Using git clone is the proper first step but might not be enough.

Install the main repository

  1. Clone the repository | git clone
  2. Check that the repository is up-to-date with the main branch | git status
  3. In case it isn't, retrieve the main branch content | git pull
  4. Assess that the branch is up-to-date | git status

Update submodules

A submodule is a git repository that is referenced by a parent git repository.
The validation service is currently composed of three submodules :

  • ifc_gherkin_rules
  • store
  • ifc_validation_models

Submodules can be identified :

  • In CLI, using the command git submodule status
  • In navigator, by the arrow inside its folder icon and its last commit identifier (starting with the character @).

To update submodules, use the command git submodule update --init --recursive.

Check the submodules status again. Since some submodules possess a specific revision, their current branch might be detached from the main branch. If detached, not all required code and resources might be available.

For each submodule that has a different revision:

  1. Go to its repository | cd
  2. Retrieve all branches | git fetch
  3. Change to main branch | git checkout main
  4. Retrieve main branch content | git pull
  5. Assess the new status | git status

After retrieving the main branch content and for the purpose of simply setting the validation service, it does not matter that some changes are not staged for commit. The only requirement is for the local branch to be up to date with origin/main.

Sanitize Scripts

End of line

Line endings in text files are expressed using:

  • CRLF, stands for Carriage Return \r + Line Feed \n and is the standard for line breaks on Windows.
  • LF ,stands for Line Feed \n and is the standard in the Linux and Unix world.

Docker containers run Linux under the hood that doens't handle CRLF well, especially with scripts and configuration files.

As such, the typical failure symptoms include :

  • Shell scripts throwing error messages when executed.
  • bash reporting Command not found even though the command is well written.

During the container build, the process may even fail quietly.

ADD --chmod

ADD --chmod can also fail quietly for various reasons.


To solve these problems I have replaced

in \docker\backend\Dockerfile :

ADD --chmod=777 ./docker/backend/server-entrypoint.sh /app/backend
ADD --chmod=777 ./docker/backend/worker-entrypoint.sh /app/backend

by

COPY ./docker/backend/server-entrypoint.sh /app/backend/
COPY ./docker/backend/worker-entrypoint.sh /app/backend/

RUN sed -i 's/\r$//' /app/backend/*entrypoint.sh && \
    chmod +x /app/backend/*entrypoint.sh

In docker\frontend\Dockerfile:

# copy custom boot scripts
ADD --chmod=777 ./docker/frontend/docker-entrypoint.d/ /docker-entrypoint.d/

by

# copy custom boot scripts
COPY /docker/frontend/docker-entrypoint.d/ /docker-entrypoint.d/

RUN sed -i 's/\r$//' /docker-entrypoint.d/*.sh && \
    chmod +x /docker-entrypoint.d/*.sh

Sanitize Production

At the moment I installed the validation service, there was a remaining file merge that was blocking the process.
I had to remove \backend\apps\ifc_validation_models\migrations\0018_merge_20251008_1414.py.


Feel free to add more insight or to correct the mistakes I may have written.

Best Regards,
Guillaume

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions