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

[BUGFIX] Update docker compose flow #695

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cletusw
Copy link

@cletusw cletusw commented Oct 13, 2023

Description

  • Add tty: true to docker-compose.yml so Ctrl-C works to stop watching logs
  • Document how to watch the logs
  • docker-compose (note the hyphen) is deprecated and unsupported as of July 2023: https://docs.docker.com/compose/reference/ . Update docs to docker compose (no hyphen)
  • Update docker-compose.yml to latest version (3)

How Has This Been Tested?

Tested locally. Before I had manually kill the docker attach unifi_logs command from a separate shell. Now Ctrl-C works.

Checklist:

Go over all the following points, and put an x in all the boxes that apply.
If you're unsure about any of these, don't hesitate to ask. We're here to help!

  • My code follows the code style of this project. (CI will test it anyway and also needs approval)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

* docker-compose (note the hyphen) is deprecated and unsupported as of July 2023: https://docs.docker.com/compose/reference/
* Document how to watch the logs and add `tty: true` so Ctrl-C works to stop watching
* Update to latest docker-compose.yml version (3)
Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@cletusw
Copy link
Author

cletusw commented Nov 13, 2023

Still relevant and important


**Logs:**

Run `docker attach unifi_logs` to tail the various unifi logs files.
Copy link

Choose a reason for hiding this comment

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

why would you want to "attach" to this container?

Copy link
Author

Choose a reason for hiding this comment

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

That's the only way I could figure out how to access the log files (to diagnose issues). Is there another way besides attach?

Copy link

Choose a reason for hiding this comment

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

well if you just want to see all the logs, as that container was made for, you can just docker compose logs -f logs (first logs is the compose command, last one is the logs container)
But then if you want to go check the logs file manually, you can just exec into the container with docker compose exec controller bash and go into /unifi/logs (either the controller or logs container as they both have point to the same logs)

Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@cletusw
Copy link
Author

cletusw commented Jan 29, 2024

Still relevant and important

Copy link

github-actions bot commented Mar 1, 2024

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@cletusw
Copy link
Author

cletusw commented Mar 1, 2024

Still relevant and important

@Gamertech
Copy link
Contributor

For whenever this gets checked and merged, may as well just delete the version: line now as it's usually ignored nowadays by Docker Engine. It adjusts versioning automatically based on what's in the compose file.

Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@cletusw
Copy link
Author

cletusw commented Apr 22, 2024

Still relevant and important

Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Side-Projects.md Outdated
```

Now as long as you don't `docker compose down`, the docker daemon (`sudo systemctl enable docker`) will automatically start the various containers every time the Pi boots.
Copy link

Choose a reason for hiding this comment

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

Do it need to be a 'Pi' or could it be just any host system?

Copy link
Author

Choose a reason for hiding this comment

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

Fixed, thanks!

Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@cletusw
Copy link
Author

cletusw commented Jun 23, 2024

For whenever this gets checked and merged, may as well just delete the version: line now as it's usually ignored nowadays by Docker Engine. It adjusts versioning automatically based on what's in the compose file.

@Gamertech Done, thanks!

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.

None yet

4 participants