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

fix: able to run pm-mode in container #766

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

helio-frota
Copy link
Collaborator

@helio-frota helio-frota commented Sep 5, 2024

Related to #725

trustify git:(minimal) ✗ podman run -it ff9a6186871e
RUST_LOG is unset, using default: 'info,actix_web_prom=error'
2024-09-05T20:12:41.391532Z  WARN trustd::db: Setting up managed DB; not suitable for production use!
2024-09-05T20:13:01.569275Z  INFO trustd::db: PostgreSQL installed in "/usr/local/bin/.trustify/postgres"
2024-09-05T20:13:01.569318Z  INFO trustd::db: Running on port 45587
2024-09-05T20:13:01.601705Z  INFO bootstrap: sqlx::postgres::notice: database "trustify" does not exist, skipping database=Database { username: "postgres", password: "trustify", host: "localhost", port: 45587, name: "trustify", max_conn: 75, min_conn: 25 }
2024-09-05T20:13:01.601756Z  INFO bootstrap: sqlx::query: summary="DROP DATABASE IF EXISTS …" db.statement="\n\nDROP DATABASE IF EXISTS \"trustify\";\n" rows_affected=0 rows_returned=0 elapsed=403.995µs elapsed_secs=0.000403995 database=Database { username: "postgres", password: "trustify", host: "localhost", port: 45587, name: "trustify", max_conn: 75, min_conn: 25 }
2024-09-05T20:13:01.639588Z  INFO bootstrap: sqlx::query: summary="CREATE DATABASE \"trustify\";" db.statement="" rows_affected=0 rows_returned=0 elapsed=28.721674ms elapsed_secs=0.028721674 database=Database { username: "postgres", password: "trustify", host: "localhost", port: 45587, name: "trustify", max_conn: 75, min_conn: 25 }
2024-09-05T20:13:01.863348Z  INFO bootstrap:migrate: sea_orm_migration::migrator: Applying all pending migrations database=Database { username: "postgres", password: "trustify", host: "localhost", port: 45587, name: "trustify", max_conn: 75, min_conn: 25 } self=Database { db: SqlxPostgresPoolConnection, name: "trustify" }
...
...

@helio-frota
Copy link
Collaborator Author

easy way to reproduce

from project root dir (copy/pasta):

./.github/scripts/dev-build.sh 0.1.0-alpha.14

copy the first image id in:

podman image list

run

podman run -it image_id_here

@ctron
Copy link
Contributor

ctron commented Sep 6, 2024

Thanks for figuring this out. I am not sure however, if we should really tweak the "production" container image, and increase its size, just for that use case.

Maybe it makes more sense, having an additional "pm" container?!

@helio-frota
Copy link
Collaborator Author

Maybe it makes more sense, having an additional "pm" container?!

I'm +1 for it -- I understand a pm-container as a way to have a pre-compiled-tag-based-easy-to-run-without-rust-installed-locally-pm-mode , which I agree that makes no much sense to be part of a "production" container

@helio-frota
Copy link
Collaborator Author

PR updated adding a new file with .pmmode extension ( .pm extension my neovim thinks it is a perl module )

@helio-frota helio-frota added this pull request to the merge queue Sep 6, 2024
Merged via the queue into trustification:main with commit bc57113 Sep 6, 2024
2 checks passed
@helio-frota helio-frota deleted the minimal branch September 6, 2024 12:17
@jcrossley3
Copy link
Contributor

Why do we need this? Who or what will consume Containerfile.pmmode @ctron ?

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.

3 participants