Giter VIP home page Giter VIP logo

Comments (7)

swoga avatar swoga commented on June 25, 2024 1

Please show your docker run command or docker-compose.yml and the output of docker ps.

from container-healthchecks.

galexrt avatar galexrt commented on June 25, 2024

@Kikobeats It isn't recommended to use latest tag, please use, e.g., v1.17.0-20201019-143145-678 tag.

In addition to that there is no need to custom build the image, unless customization is needed. The Dockerfile of this project already has an EXPOSE ... in it.
Your docker run still needs to publish / expose the ports by one of the available flags for that.

from container-healthchecks.

Kikobeats avatar Kikobeats commented on June 25, 2024

@swoga I'm running using a Dockerfile, I understand the project is ready for that.

@galexrt latest is as valid as the version you did mention.

When I run using docker run, logs look ok:

dploy run --debug
- Building docker image us.icr.io/dploy-etx/etx-monitoring-healthchecks:master...
Sending build context to Docker daemon  20.48kB
Step 1/1 : FROM galexrt/healthchecks:latest
 ---> 50f548b785ea
Successfully built 50f548b785ea
Successfully tagged us.icr.io/dploy-etx/etx-monitoring-healthchecks:master
✔ Building docker image us.icr.io/dploy-etx/etx-monitoring-healthchecks:master. Done in 384ms
- Running docker image on http://localhost:8080...
/healthchecks/hc/settings.py:226: UserWarning: local_settings.py not found, using defaults
  warnings.warn("local_settings.py not found, using defaults")
Compressing... done
Compressed 20 block(s) from 104 template(s) for 0 context(s).
/healthchecks/hc/settings.py:226: 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:
314 static files copied to '/healthchecks/static-collected'.
Correcting config file permissions ...
Migrating database ...
/healthchecks/hc/settings.py:226: 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:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying accounts.0001_initial... OK
  Applying accounts.0002_profile_ping_log_limit... OK
  Applying accounts.0003_profile_token... OK
  Applying accounts.0004_profile_api_key... OK
  Applying accounts.0005_auto_20160509_0801... OK
  Applying accounts.0006_profile_current_team... OK
  Applying accounts.0007_profile_check_limit... OK
  Applying accounts.0008_profile_bill_to... OK
  Applying accounts.0009_auto_20170714_1734... OK
  Applying accounts.0010_profile_team_limit... OK
  Applying accounts.0011_profile_sort... OK
  Applying accounts.0012_auto_20171014_1002... OK
  Applying accounts.0013_remove_profile_team_access_allowed... OK
  Applying accounts.0014_auto_20171227_1530... OK
  Applying accounts.0015_auto_20181029_1858... OK
  Applying accounts.0016_remove_profile_bill_to... OK
  Applying accounts.0017_auto_20190112_1426... OK
  Applying accounts.0018_auto_20190112_1426... OK
  Applying accounts.0019_project_badge_key... OK
  Applying accounts.0020_auto_20190112_1950... OK
  Applying accounts.0021_auto_20190112_2005... OK
  Applying accounts.0022_auto_20190114_0857... OK
  Applying accounts.0023_auto_20190117_1419... OK
  Applying accounts.0024_auto_20190119_1540... OK
  Applying accounts.0025_remove_member_team... OK
  Applying accounts.0026_auto_20190204_2042... OK
  Applying accounts.0027_profile_deletion_notice_date... OK
  Applying accounts.0028_auto_20191119_1346... OK
  Applying accounts.0029_remove_profile_current_project... OK
  Applying accounts.0030_member_transfer_request_date... OK
  Applying accounts.0031_auto_20200803_1413... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying admin.0003_logentry_add_action_flag_choices... OK
  Applying api.0001_initial... OK
  Applying api.0002_auto_20150616_0732... OK
  Applying api.0003_auto_20150616_1249... OK
  Applying api.0004_auto_20150616_1319... OK
  Applying api.0005_auto_20150630_2021... OK
  Applying api.0006_check_grace... OK
  Applying api.0007_ping... OK
  Applying api.0008_auto_20150801_1213... OK
  Applying api.0009_auto_20150801_1250... OK
  Applying api.0010_channel... OK
  Applying api.0011_notification... OK
  Applying api.0012_auto_20150930_1922... OK
  Applying api.0013_auto_20151001_2029... OK
  Applying api.0014_auto_20151019_2039... OK
  Applying api.0015_auto_20151022_1008... OK
  Applying api.0016_auto_20151030_1107... OK
  Applying api.0017_auto_20151117_1032... OK
  Applying api.0018_remove_ping_body... OK
  Applying api.0019_check_tags... OK
  Applying api.0020_check_n_pings... OK
  Applying api.0021_ping_n... OK
  Applying api.0022_auto_20160130_2042... OK
  Applying api.0023_auto_20160131_1919... OK
  Applying api.0024_auto_20160203_2227... OK
  Applying api.0025_auto_20160216_1214... OK
  Applying api.0026_auto_20160415_1824... OK
  Applying api.0027_auto_20161213_1059... OK
  Applying api.0028_auto_20170305_1907... OK
  Applying api.0029_auto_20170507_1251... OK
  Applying api.0030_check_last_ping_body... OK
  Applying api.0031_auto_20170509_1320... OK
  Applying api.0032_auto_20170608_1158... OK
  Applying api.0033_auto_20170714_1715... OK
  Applying api.0034_auto_20171227_1530... OK
  Applying api.0035_auto_20171229_2008... OK
  Applying api.0036_auto_20180116_2243... OK
  Applying api.0037_auto_20180127_1215... OK
  Applying api.0038_auto_20180318_1306... OK
  Applying api.0039_remove_check_last_ping_body... OK
  Applying api.0040_auto_20180517_1336... OK
  Applying api.0041_check_desc... OK
  Applying api.0042_auto_20181029_1522... OK
  Applying api.0043_channel_name... OK
  Applying api.0044_auto_20181120_2004... OK
  Applying api.0045_flip... OK
  Applying api.0046_auto_20181218_1245... OK
  Applying api.0047_auto_20181225_2315... OK
  Applying api.0048_auto_20190102_0737... OK
  Applying api.0049_auto_20190102_0743... OK
  Applying api.0050_ping_kind... OK
  Applying api.0051_auto_20190104_0908... OK
  Applying api.0052_auto_20190104_1122... OK
  Applying api.0053_check_subject... OK
  Applying api.0054_auto_20190112_1427... OK
  Applying api.0055_auto_20190112_1427... OK
  Applying api.0056_auto_20190114_0857... OK
  Applying api.0057_auto_20190118_1319... OK
  Applying api.0058_auto_20190312_1716... OK
  Applying api.0059_auto_20190314_1744... OK
  Applying api.0060_tokenbucket... OK
  Applying api.0061_webhook_values... OK
  Applying api.0062_auto_20190720_1350... OK
  Applying api.0063_auto_20190903_0901... OK
  Applying api.0064_auto_20191119_1346... OK
  Applying api.0065_auto_20191127_1240... OK
  Applying api.0066_channel_last_error... OK
  Applying api.0067_last_error_values... OK
  Applying api.0068_auto_20200117_1023... OK
  Applying api.0069_auto_20200117_1227... OK
  Applying api.0070_auto_20200411_1310... OK
  Applying api.0071_check_manual_resume... OK
  Applying api.0072_auto_20200701_1007... OK
  Applying api.0073_auto_20200721_1000... OK
  Applying api.0074_auto_20200803_1411... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying auth.0009_alter_user_last_name_max_length... OK
  Applying auth.0010_alter_group_name_max_length... OK
  Applying auth.0011_update_proxy_permissions... OK
  Applying payments.0001_initial... OK
  Applying payments.0002_subscription_plan_id... OK
  Applying payments.0003_subscription_address_id... OK
  Applying payments.0004_subscription_send_invoices... OK
  Applying payments.0005_subscription_plan_name... OK
  Applying payments.0006_subscription_invoice_email... OK
  Applying sessions.0001_initial... OK
2020-10-21 08:19:43,040 INFO supervisord started with pid 1
2020-10-21 08:19:44,046 INFO spawned: 'prunepings' with pid 16
2020-10-21 08:19:44,048 INFO spawned: 'pruneflips' with pid 17
2020-10-21 08:19:44,049 INFO spawned: 'gunicorn' with pid 18
2020-10-21 08:19:44,051 INFO spawned: 'prunenotifications' with pid 19
2020-10-21 08:19:44,053 INFO spawned: 'nginx' with pid 21
2020-10-21 08:19:44,059 INFO spawned: 'sendreports' with pid 23
2020-10-21 08:19:44,061 INFO spawned: 'sendalerts' with pid 25
2020-10-21 08:19:44,063 INFO spawned: 'smtpd' with pid 26
2020-10-21 08:19:45,905 INFO success: prunepings entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-10-21 08:19:45,905 INFO success: pruneflips entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-10-21 08:19:45,905 INFO success: gunicorn entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-10-21 08:19:45,905 INFO success: prunenotifications entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-10-21 08:19:45,905 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-10-21 08:19:45,906 INFO success: sendreports entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-10-21 08:19:45,906 INFO success: sendalerts entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-10-21 08:19:45,906 INFO success: smtpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

I can see the process is running with docker ps:

docker ps
CONTAINER ID        IMAGE                                                    COMMAND                  CREATED             STATUS                   PORTS                                      NAMES
58fd9c302614        us.icr.io/dploy-etx/etx-monitoring-healthchecks:master   "/entrypoint.sh app:…"   2 minutes ago       Up 2 minutes (healthy)   2525/tcp, 8000/tcp, 0.0.0.0:8080->80/tcp   elastic_germain

but trying to access to http://localhost:8080 doesn't have any effect.

from container-healthchecks.

swoga avatar swoga commented on June 25, 2024

The port mapping 0.0.0.0:8080->80/tcp is incorrect, you need to change it to 0.0.0.0:8080->8000/tcp.
Nginx listens on port 8000 inside the container.

from container-healthchecks.

Kikobeats avatar Kikobeats commented on June 25, 2024

now we are in sync!

The problem is, I'm using IBM Cloud CloudFroundry, and necessary the traffic needs to be exposed over 8080 port.

Could be possible a way to customize the port used?

from container-healthchecks.

galexrt avatar galexrt commented on June 25, 2024

You can't change the application port in IBM Cloud CloudFoundry?

Technically it is possible to change the port during start in the entrypoint.sh script in the nginx.conf file, I'm happy to review a PR to add this as a feature.

If you build the container yourself, you should be able to use sed to replace the port 8000 in the nginx.conf here: https://github.com/galexrt/docker-healthchecks/blob/master/includes/nginx/nginx.conf#L23

from container-healthchecks.

Kikobeats avatar Kikobeats commented on June 25, 2024

Thanks for the help 🙂

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.