Giter VIP home page Giter VIP logo

Comments (6)

galexrt avatar galexrt commented on September 26, 2024 1

@jeliasson Yeah those mounts shouldn't be there. I have updated the README to fix the unnecessary mounts and added some more info regarding configuration.

from container-healthchecks.

galexrt avatar galexrt commented on September 26, 2024

You can just use the env vars from the healthchecks project settings.py now.
I have removed all the entrypoint code to do any custom configuration, so the settings.py comes into full effect.

So does removing the HC in front of your env vars work with the latest image? (Quay.io image is already uptodate, Docker Hub still needs a few more minutes to auto build).

from container-healthchecks.

jeliasson avatar jeliasson commented on September 26, 2024

You can just use the env vars from the healthchecks project settings.py now.

Neat!

So does removing the HC in front of your env vars work with the latest image? (Quay.io image is already uptodate, Docker Hub still needs a few more minutes to auto build).

Running some tests now with galexrt/healthchecks:latest. Getting back to you soon.

from container-healthchecks.

jeliasson avatar jeliasson commented on September 26, 2024

There is something that is acting up. Worth mentioning is that I'm deploying this to Kubernetes, but besides some minor permissions issues it should not be this hard.

Currently I'm struggling with the /healthchecks being empty at first run, which requires me to clone healthchecks/healthchecks manually. After that I get the error message below, without any healthchecks/hc/local_settings.py being generated.

/entrypoint.sh: line 13: databaseConfiguration: command not found
/entrypoint.sh: line 14: settingsConfiguration: command not found
Compressing... done
Compressed 18 block(s) from 98 template(s) for 0 context(s).
You have requested to collect static files at the destination
location as specified in your settings:
    /healthchecks/static-collected
This will overwrite existing files!
Are you sure you want to do this?
Traceback (most recent call last):
  File "/healthchecks/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/healthchecks/.local/lib/python3.7/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/home/healthchecks/.local/lib/python3.7/site-packages/django/core/management/__init__.py", line 395, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/healthchecks/.local/lib/python3.7/site-packages/django/core/management/base.py", line 328, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/healthchecks/.local/lib/python3.7/site-packages/django/core/management/base.py", line 369, in execute
    output = self.handle(*args, **options)
  File "/home/healthchecks/.local/lib/python3.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 187, in handle
    collected = self.collect()
  File "/home/healthchecks/.local/lib/python3.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 104, in collect
    for path, storage in finder.list(self.ignore_patterns):
  File "/home/healthchecks/.local/lib/python3.7/site-packages/django/contrib/staticfiles/finders.py", line 130, in list
    for path in utils.get_files(storage, ignore_patterns):
  File "/home/healthchecks/.local/lib/python3.7/site-packages/django/contrib/staticfiles/utils.py", line 39, in get_files
    yield from get_files(storage, ignore_patterns, dir)
  File "/home/healthchecks/.local/lib/python3.7/site-packages/django/contrib/staticfiles/utils.py", line 39, in get_files
    yield from get_files(storage, ignore_patterns, dir)
  File "/home/healthchecks/.local/lib/python3.7/site-packages/django/contrib/staticfiles/utils.py", line 39, in get_files
    yield from get_files(storage, ignore_patterns, dir)
  [Previous line repeated 37 more times]
  File "/home/healthchecks/.local/lib/python3.7/site-packages/django/contrib/staticfiles/utils.py", line 23, in get_files
    directories, files = storage.listdir(location)
  File "/home/healthchecks/.local/lib/python3.7/site-packages/django/core/files/storage.py", line 317, in listdir
    if entry.is_dir():
OSError: [Errno 40] Too many levels of symbolic links: '/healthchecks/static/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE/CACHE'
ln: failed to create symbolic link '/healthchecks/static/CACHE/CACHE': File exists
Type 'yes' to continue, or 'no' to cancel: Correcting config file permissions ...
Migrating database ...
Operations to perform:
  Apply all migrations: accounts, admin, api, auth, contenttypes, payments, sessions
Running migrations:
  No migrations to apply.
2020-02-22 23:19:29,660 INFO supervisord started with pid 1
2020-02-22 23:19:30,663 INFO spawned: 'nginx' with pid 19
2020-02-22 23:19:30,665 INFO spawned: 'gunicorn' with pid 20
2020-02-22 23:19:30,666 INFO spawned: 'sendalerts' with pid 21
2020-02-22 23:19:31,734 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-02-22 23:19:31,734 INFO success: gunicorn entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-02-22 23:19:31,734 INFO success: sendalerts entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

Right now I'm on the verge of manually copying in local_settings.py from a ConfigMap as a work-around. If you know what's going on, please let me know.

from container-healthchecks.

galexrt avatar galexrt commented on September 26, 2024

You shouldn't need to copy in the local_settings.py that is just a "warning" which is completely okay in this case.

I have pushed some improvements to master and tagged it as v1.13.0-0. The images should be available in like 30 minutes or so.


Are you mounting the /healthchecks direcotry somewhere? Using the latest Docker image there is no need to do any manual steps so you seem to mount / do something which breaks the image.

from container-healthchecks.

jeliasson avatar jeliasson commented on September 26, 2024

I have pushed some improvements to master and tagged it as v1.13.0-0. The images should be available in like 30 minutes or so.

Seems to have been built, but Docker Hub is missing the tag. Can you please tag it manually?

Are you mounting the /healthchecks direcotry somewhere? Using the latest Docker image there is no need to do any manual steps so you seem to mount / do something which breaks the image.

Yes. Is there no need to mount? I got confused by the volume mapping.

Update 1
I removed volume mounts (both /data and /healthchecks and used image quay.io/galexrt/healthchecks:v1.13.0-0.

Structure of /healthcheck

healthchecks@healthchecks-669bc78d6b-blx2b:/$ ls /healthchecks/
CHANGELOG.md  LICENSE  README.md  hc  manage.py  requirements.txt  static  static-collected  stuff  supervisord.log  supervisord.pid  templates
healthchecks@healthchecks-669bc78d6b-blx2b:/$ ls /healthchecks/hc/
__init__.py  __pycache__  accounts  api  front  lib  local_settings.py.example  payments  settings.py  test.py  urls.py  wsgi.py
healthchecks@healthchecks-669bc78d6b-blx2b:/$

Log

/healthchecks/hc/settings.py:225: UserWarning: local_settings.py not found, using defaults
  warnings.warn("local_settings.py not found, using defaults")
Compressing... done
Compressed 18 block(s) from 96 template(s) for 0 context(s).
/healthchecks/hc/settings.py:225: UserWarning: local_settings.py not found, using defaults
  warnings.warn("local_settings.py not found, using defaults")
You have requested to collect static files at the destination
location as specified in your settings:
    /healthchecks/static-collected
This will overwrite existing files!
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel: 
295 static files copied to '/healthchecks/static-collected'.
Correcting config file permissions ...
Migrating database ...
/healthchecks/hc/settings.py:225: UserWarning: local_settings.py not found, using defaults
  warnings.warn("local_settings.py not found, using defaults")
Operations to perform:
  Apply all migrations: accounts, admin, api, auth, contenttypes, payments, sessions
Running migrations:
  No migrations to apply.
2020-02-23 01:09:30,566 INFO supervisord started with pid 1
2020-02-23 01:09:31,569 INFO spawned: 'nginx' with pid 15
2020-02-23 01:09:31,570 INFO spawned: 'gunicorn' with pid 16
2020-02-23 01:09:31,572 INFO spawned: 'sendalerts' with pid 17
2020-02-23 01:09:32,903 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-02-23 01:09:32,903 INFO success: gunicorn entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-02-23 01:09:32,903 INFO success: sendalerts entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

Update 2
It seems like the database is seeded now, with the same output as Edit 1. Problem I seem to have now is that I'm getting Bad Request (404).

I'll have a closer look on it tomorrow.

Update 3
Finally got it sorted. The Bad Request (404) was just wrong configuration of ALLOWED_HOSTS which I saw then I turned debugging on.

Thanks for your help @galexrt!

from container-healthchecks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.