0

My objective is to insert one line in a file inside a docker container, sometimes it's working smoothly sometime the docker takes restarts frequently and from the docker logs I am getting this error

-e:5:in <main>': undefined method []' for nil:NilClass (NoMethodError)

here is the copy of config/database.yml

development:
  adapter: postgresql
  database: redmine_test
  host: localhost
  username: postgres
  password: "postgres"
  pool: 20 - Added this line
Onik Azad
  • 31
  • 4
  • You have tagged chef-infra but there is no Chef code in question. How is the file being edited inside container? Also, please explain the requirement for updating file in running container. – seshadri_c Feb 19 '22 at 03:40
  • I got some DB connection-related errors and then decided to increase the default pool size 5 to 20. Please note that my Redmine app is running in a docker container so I used a chef bash resource to inject "pool: 20" – Onik Azad Feb 19 '22 at 08:18
  • actually, I got the solution by doing it in a different way. So, I put the container in sleep mode for 300 secs to be fully initiated and later I inserted the DB POOL configuration by running chef bash resource. it worked as expected! – Onik Azad Mar 09 '22 at 07:11

0 Answers0