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

Two separate containers in the same network overlapping #197

Closed
mostafaqanbaryan opened this issue Nov 3, 2022 · 2 comments
Closed

Two separate containers in the same network overlapping #197

mostafaqanbaryan opened this issue Nov 3, 2022 · 2 comments

Comments

@mostafaqanbaryan
Copy link

mostafaqanbaryan commented Nov 3, 2022

Hi.
I have 2 compose files with the same network, but different names and everything.
When both containers are up, they somehow overlap and I don't know why.
This is the log from the first one:

2022-11-03T09:27:28.698+03:30  common.go:125 ▶ NOTICE [Job "datecron" (0fa46808e730)] Finished in "111.423001ms", failed: false, skipped: false, error: none
2022-11-03T09:28:20.17+03:30  common.go:125 ▶ NOTICE [Job "datecron" (8541319f7f4c)] Started - php /var/www/html/cron.php 1>> /dev/null 2>&1
2022-11-03T09:28:20.27+03:30  common.go:125 ▶ NOTICE [Job "datecron" (8541319f7f4c)] Finished in "100.497555ms", failed: false, skipped: false, error: none
2022-11-03T09:29:08.586+03:30  common.go:125 ▶ NOTICE [Job "datecron" (62516f597491)] Started - php /var/www/html/cron.php 1>> /dev/null 2>&1
2022-11-03T09:29:08.69+03:30  common.go:125 ▶ NOTICE [Job "datecron" (62516f597491)] Finished in "103.143728ms", failed: false, skipped: false, error: none

And this is the log from second one:

2022-11-03T09:27:21.588+03:30  common.go:125 ▶ NOTICE [Job "datecron" (ec0db6a0c9be)] Started - php /var/www/html/cron.php 1>> /dev/null 2>&1
2022-11-03T09:27:21.705+03:30  common.go:125 ▶ NOTICE [Job "datecron" (ec0db6a0c9be)] Finished in "116.898175ms", failed: false, skipped: false, error: none
2022-11-03T09:28:09.587+03:30  common.go:125 ▶ NOTICE [Job "datecron" (eec66d37248a)] Started - php /var/www/html/cron.php 1>> /dev/null 2>&1
2022-11-03T09:28:09.69+03:30  common.go:125 ▶ NOTICE [Job "datecron" (eec66d37248a)] Finished in "103.538251ms", failed: false, skipped: false, error: none

As you can see, both of these executing php /var/www/html/cron.php, But the second one doesn't have this at all and has a different job:

labels:
    ofelia.enabled: "true"
    felia.job-exec.datecron.schedule: "@every 30m"
    ofelia.job-exec.datecron.command: "php /var/www/html/wp-cron.php"

Maybe if I could set the name of Ofelia container like: ofelia.name: "something", this would be solved.
Any help is appreciated. Thank you.

@FluffyDiscord
Copy link

I double down this is an issue if I want to have separate ofelia service per docker-compose. I can see all other ofelia instances running and dispatching each other jobs. I am aware that we are using labels and mount the docker socked directly, but I still consider this a bug.

Is there a way to separate these docker-compose containers?

@taraspos
Copy link
Collaborator

Just released version v0.3.9

Where you can use CLI flag like

-f label=com.docker.compose.project=${COMPOSE_PROJECT_NAME}

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

No branches or pull requests

3 participants