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

Update docker instructions in Makefile and README #1843

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

jwkaltz
Copy link
Member

@jwkaltz jwkaltz commented Oct 18, 2023

As docker-compose is deprecated, "docker compose" shall be used instead.

@codecov
Copy link

codecov bot commented Oct 18, 2023

Codecov Report

Merging #1843 (ac63a81) into master (bcf3855) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1843   +/-   ##
=======================================
  Coverage   77.73%   77.73%           
=======================================
  Files         127      127           
  Lines        5268     5268           
=======================================
  Hits         4095     4095           
  Misses       1173     1173           
Flag Coverage Δ
unittests 77.73% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@michmuel
Copy link
Collaborator

After:
docker compose run --rm -u $(id -u):$(id -g) oereb-make build

I get this warning:

WARN[0000] The "LOCAL_GID" variable is not set. Defaulting to a blank string.

and then an error when executing the Makefile:

/venvs/.venv/bin/pip3 install --upgrade pip wheel                                                                                                                                                                    
Traceback (most recent call last):                                                                                                                                                                                   
  File "/venvs/.venv/bin/pip3", line 5, in <module>
    from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'
make: *** [Makefile:69: /venvs/.venv/requirements-timestamp] Error 1

@jwkaltz : Do you have a suggestion?

@svamaa
Copy link
Collaborator

svamaa commented Oct 18, 2023

After: docker compose run --rm -u $(id -u):$(id -g) oereb-make build

I get this warning:

WARN[0000] The "LOCAL_GID" variable is not set. Defaulting to a blank string.

and then an error when executing the Makefile:

/venvs/.venv/bin/pip3 install --upgrade pip wheel                                                                                                                                                                    
Traceback (most recent call last):                                                                                                                                                                                   
  File "/venvs/.venv/bin/pip3", line 5, in <module>
    from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'
make: *** [Makefile:69: /venvs/.venv/requirements-timestamp] Error 1

@jwkaltz : Do you have a suggestion?

I got the same error. I had to delete all dependencies, still had a old .venv Folder, and deleted all volumes.
Recently we got a new docker Version (4.22.0) I thought the issue also came from that.

Also, it seems to me that the tables in oereb-db are not filled correctly. I was struggeling a bit but could not find the cause yet.
I was running master branch. not this one.

@jwkaltz
Copy link
Member Author

jwkaltz commented Oct 18, 2023

@svamaa @michmuel I am not sure, but this is what worked for me:

make docker-clean-all
docker compose up -d oereb-db
make tests

(This was just for running the test suite. For the development server, "make serve" seem to work for me, although I didn't fully test that).

@michmuel
Copy link
Collaborator

It works when I run

export LOCAL_UID=$(id -u)
export LOCAL_GID=$(id -g)

before the
docker compose run --rm -u $(id -u):$(id -g) oereb-make build

@svamaa
Copy link
Collaborator

svamaa commented Oct 18, 2023

It is running for me too.
however, I cannot run the make commands on my local machine. I have to run them inside the oereb-make container, which is a different environment than locally on my machine.
That's why I can't run make docker-clean-all, but anyways, I can use the underlying commands manually.

This pull request can be merged from my point of view.

@voisardf
Copy link
Collaborator

I started with docker compose run --rm oereb-make clean-all then the build commands as adapted. I also got the warning regarding the variable not set, but ignored it. I could produce a json and a pdf at the end

@jwkaltz jwkaltz merged commit 122c3c2 into master Oct 19, 2023
12 checks passed
@jwkaltz jwkaltz deleted the update_docker_instruction branch October 19, 2023 05:41
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.

5 participants