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

Configure docker so that it doesn't use up all the space on the SD card #198

Closed
nolim1t opened this issue Mar 27, 2019 · 9 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@nolim1t
Copy link
Member

nolim1t commented Mar 27, 2019

Issue

After a while the SD card gets used up with logfiles.

Solution

Set a configuration value to stop the docker log files from taking up all the space, or disabling log files if it is possible as we already have logging (is this possible @noaho ? )

Temporary fix

Restart docker-compose every week or two.

Where its an issue

On the food4thought box and my own box,

@nolim1t nolim1t added the bug Something isn't working label Mar 27, 2019
@nolim1t
Copy link
Member Author

nolim1t commented Mar 27, 2019

Another temporary fix which stops logs completely (so you have to use individual app logs)

echo "" > $(docker inspect --format='{{.LogPath}}' compose_btcbox_1)
echo "" > $(docker inspect --format='{{.LogPath}}' compose_btcbox_1)
echo "" > $(docker inspect --format='{{.LogPath}}' compose_invoicerbox_1)

@AnotherDroog
Copy link
Member

Cool that's a good idea as a temporary workaround

@AnotherDroog
Copy link
Member

What if it's not the logs?

@AnotherDroog AnotherDroog self-assigned this Mar 27, 2019
@nolim1t
Copy link
Member Author

nolim1t commented Mar 27, 2019

it seems the main culprit is whats in containers.

@nolim1t
Copy link
Member Author

nolim1t commented Mar 27, 2019

btw that above workaround doesn't stop the box logs, it actually just wipes it temporarily.

So we don't have to restart docker-compose

We just iterate through all the containers (which I think we should include nginx and iotwifi), and pass

echo "" > $(docker inspect --format='{{.LogPath}}' containername)

and it will just reset the containers log files

@AnotherDroog
Copy link
Member

This ties in to #76

@nolim1t
Copy link
Member Author

nolim1t commented Mar 27, 2019

Created issue within noma project to make this a utility for now, as configuring docker and reproducing this issue takes some time to reconfirm that it still is an issue.

Alternatively, can remap logs to /dev/null

@noaho
Copy link
Contributor

noaho commented Aug 14, 2019

I also doubt this is the logs. To clean up past docker images, builds, etc, use docker system prune command.

@nolim1t
Copy link
Member Author

nolim1t commented Aug 14, 2019

Perhaps we could put docker system prune --force on a crontab ?

@nolim1t nolim1t closed this as completed Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants