Skip to content

Add default restart policies and logging options to all containers - #233

Open
khaledk2 wants to merge 2 commits into
ome:masterfrom
khaledk2:change_restart_policy_limit_logs
Open

Add default restart policies and logging options to all containers#233
khaledk2 wants to merge 2 commits into
ome:masterfrom
khaledk2:change_restart_policy_limit_logs

Conversation

@khaledk2

Copy link
Copy Markdown
Contributor

@pwalczysko has updated the nginxjenkins container to ensure it always restarts on the idr3-slot2 server.
I think the same should be applied to all containers to ensure that all containers automatically restart when the machine reboots or fails for any reason

This PR changes the restart policy to unless-stopped to all containers.

In addition, it sets logging options for each container:

  • The size of the log file to be 100 mb, so no single log file grows indefinitely.
  • Docker will keep up to three log files for each container

This configuration helps in maintaining the health and performance of the containers by ensuring that logs do not consume too much disk space.

@khaledk2

Copy link
Copy Markdown
Contributor Author

cc @jburel

Comment thread docker-compose.yml Outdated
build:
context: ./server
dockerfile: Dockerfile

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Remove the empty line to unify with the rest of the file.

@pwalczysko

pwalczysko commented Aug 19, 2026

Copy link
Copy Markdown
Member

I have added the changes from this PR to the docker-compose.yml on idr3-slot2.
I have also changed the cron script so that it just do the chmod 400 1 hour after the restart of the machine, but no docker compose....up anymore, as the "uppness" should be taken care of by the changes in this PR.

I guess we will see next Tuesday how effective this tactics is.

@khaledk2

khaledk2 commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

Just a quick note: After merging changes from the PR into the Docker Compose file on idr3-slot2, docker-compose.yml should be run to apply them

@pwalczysko

Copy link
Copy Markdown
Member

Just a quick note: After merging changes from the PR into the Docker Compose file on idr3-slot2, docker-compose.yml should be run to apply them

aha, more specifically, do we need to run the whole docker compose -f docker-compose.yml down and docker compose -f docker-compose.yml up -d ? Or is there some milder method to apply the changes ?

@khaledk2

Copy link
Copy Markdown
Contributor Author

Just run docker compose up -d, it should be fine.

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.

2 participants