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

[Documentation] Update docker-compose steps to support podman #2855

Merged
merged 1 commit into from
Mar 11, 2023

Conversation

white-gecko
Copy link
Contributor

@white-gecko white-gecko commented Mar 9, 2023

Update the documentation.

As also written in the docker-compose file it is necessary to do the steps in the order:

  1. Run 'docker-compose pull'.
  2. Run 'docker-compose run --rm webserver createsuperuser' to create a user.
  3. Run 'docker-compose up -d'.

This is also the order of steps in the setup script:

${DOCKER_COMPOSE_CMD} pull
${DOCKER_COMPOSE_CMD} run --rm -e DJANGO_SUPERUSER_PASSWORD="$PASSWORD" webserver createsuperuser --noinput --username "$USERNAME" --email "$EMAIL"
${DOCKER_COMPOSE_CMD} up --detach

Proposed change

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other (please explain)

Checklist:

  • I have read & agree with the contributing guidelines.
  • If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.
  • If applicable, I have checked that all tests pass, see documentation.
  • I have run all pre-commit hooks, see documentation.
  • I have made corresponding changes to the documentation as needed.
  • I have checked my modifications for any breaking changes.

As also written in the docker-compose file it is necessary to do the steps in the order:

1. Run 'docker-compose pull'.
2. Run 'docker-compose run --rm webserver createsuperuser' to create a user.
3. Run 'docker-compose up -d'.
@paperless-ngx-secretary paperless-ngx-secretary bot added documentation Improvements or additions to documentation small-change labels Mar 9, 2023
@shamoon
Copy link
Member

shamoon commented Mar 10, 2023

I don't actually think this change is needed though? Works fine as is

@white-gecko
Copy link
Contributor Author

Actually it did not work for me at least on podman.
When I first pulled, then brought the compose up and subsequently tried to create the user I received the following error message:

$ docker-compose pull
Pulling broker    ... done
Pulling db        ... done
Pulling gotenberg ... done
Pulling tika      ... done
Pulling webserver ... done

$ docker-compose up -d
docker-compose up -d
Creating network "paperless_default" with the default driver
Creating volume "paperless_data" with default driver
Creating volume "paperless_media" with default driver
Creating volume "paperless_pgdata" with default driver
Creating volume "paperless_redisdata" with default driver
Creating paperless_broker_1    ... done
Creating paperless_gotenberg_1 ... done
Creating paperless_db_1        ... done
Creating paperless_tika_1      ... done
Starting paperless_webserver_1 ... done

$ docker-compose run --rm --no-deps webserver createsuperuser
Creating paperless_webserver_run ... error

ERROR: for paperless_webserver_run  Cannot create container for service webserver: bad parameter: link is not supported

ERROR: for webserver  Cannot create container for service webserver: bad parameter: link is not supported
ERROR: Encountered errors while bringing up the project.

So I had to switch the run and up commands

@shamoon
Copy link
Member

shamoon commented Mar 10, 2023

Ah, well I do think that’s only true for podman.

googling the specific error re link suggests other solutions: containers/podman#11717

I suppose if it works in both cases the change would be OK, especially if it’s written that way elsewhere.

@white-gecko
Copy link
Contributor Author

I see, thank you for the research and clarification. But since I assume it works in the suggested way as well, as also shown in all of the other point in the project this would improve the podman support.

@shamoon shamoon changed the title Update docker-compose start steps Update docker-compose steps to support podman Mar 10, 2023
Copy link
Member

@shamoon shamoon left a comment

Choose a reason for hiding this comment

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

Will leave merge pending others agree

Copy link
Member

@stumpylog stumpylog left a comment

Choose a reason for hiding this comment

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

Seems like it shouldn't cause an issue

@shamoon shamoon merged commit 952cf11 into paperless-ngx:dev Mar 11, 2023
@shamoon shamoon changed the title Update docker-compose steps to support podman Docs: Update docker-compose steps to support podman Mar 11, 2023
@shamoon shamoon changed the title Docs: Update docker-compose steps to support podman [Documentation] Update docker-compose steps to support podman Mar 11, 2023
@white-gecko white-gecko deleted the patch-1 branch March 11, 2023 16:57
@github-actions
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation small-change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants