-
-
Notifications
You must be signed in to change notification settings - Fork 0
Merge infra changes to main #39
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
base: main
Are you sure you want to change the base?
Changes from all commits
31b3b64
e976a8c
fdfe909
46d1264
6f52ff9
8217717
ec1dbe2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -12,10 +12,51 @@ services: | |||||||||
| - PORT=8020 | ||||||||||
| networks: | ||||||||||
| - caddy | ||||||||||
| - tags | ||||||||||
| labels: | ||||||||||
| caddy_0: tags.b1.buape.com | ||||||||||
| caddy_0.reverse_proxy: "{{upstreams 8020}}" | ||||||||||
|
|
||||||||||
| db: | ||||||||||
| image: postgres:17 | ||||||||||
| restart: always | ||||||||||
| shm_size: 256mb | ||||||||||
| environment: | ||||||||||
| POSTGRES_PASSWORD: ${DB_PASS} | ||||||||||
| POSTGRES_DB: ${DB_NAME} | ||||||||||
| POSTGRES_USER: ${DB_USER} | ||||||||||
| volumes: | ||||||||||
| - "tags-db:/var/lib/postgresql/data" | ||||||||||
| networks: | ||||||||||
| - tags | ||||||||||
| ports: | ||||||||||
| - "41006:5432" | ||||||||||
|
Comment on lines
+32
to
+33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid exposing Postgres on all host interfaces by default. At Line 33, Safer default- ports:
- - "41006:5432"
+ ports:
+ - "127.0.0.1:41006:5432"📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| command: ["postgres", "-c", "log_statement=ddl", "-c", "log_destination=stderr"] | ||||||||||
|
|
||||||||||
| postgres-backup: | ||||||||||
| image: itbm/postgres-backup-s3 | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # First, let's find and read the docker-compose.yml file
find . -name "docker-compose.yml" -type fRepository: buape/Tags Length of output: 74 🏁 Script executed: # Also search for any docker-compose files
find . -name "docker-compose*" -type fRepository: buape/Tags Length of output: 74 🌐 Web query:
💡 Result: Registries & image names
Available tags / versions (confirmed)GHCR (
|
||||||||||
| networks: | ||||||||||
| - tags | ||||||||||
| depends_on: | ||||||||||
| - db | ||||||||||
| environment: | ||||||||||
| - S3_ACCESS_KEY_ID=${S3_KEY} | ||||||||||
| - S3_SECRET_ACCESS_KEY=${S3_PASS} | ||||||||||
| - S3_BUCKET=${S3_BUCKET} | ||||||||||
| - S3_PREFIX=tags | ||||||||||
| - S3_ENDPOINT=${S3_ENDPOINT} | ||||||||||
| - S3_REGION=${S3_REGION} | ||||||||||
| - POSTGRES_DATABASE=${DB_NAME} | ||||||||||
| - POSTGRES_USER=${DB_USER} | ||||||||||
| - POSTGRES_PASSWORD=${DB_PASS} | ||||||||||
| - POSTGRES_HOST=db | ||||||||||
| - SCHEDULE=@hourly | ||||||||||
|
|
||||||||||
| volumes: | ||||||||||
| tags-db: | ||||||||||
|
|
||||||||||
| networks: | ||||||||||
| caddy: | ||||||||||
| external: true | ||||||||||
| tags: | ||||||||||
| external: true | ||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
pnpm install --frozen-lockfile behavior lockfile changes documentation💡 Result:
pnpm install --frozen-lockfileis meant for reproducible installs (especially CI):pnpm-lock.yaml. Ifpnpmwould need to change the lockfile to complete the install, the command fails. [1]frozen-lockfile=truein CI when a lockfile is present), so CI installs will fail if the lockfile would need an update. [1]What counts as “lockfile needs an update” / why it fails:
package.json(dependencies/versions/overrides, workspace packages, etc.) but didn’t runpnpm installand commit the updated lockfile, leading toERR_PNPM_OUTDATED_LOCKFILE. [2]How to resolve (typical workflow):
pnpm install(or explicitlypnpm install --no-frozen-lockfile) and commit thepnpm-lock.yamlchanges. [2]Sources:
[1] pnpm CLI docs:
pnpm install→--frozen-lockfilebehavior and CI default. (pnpm.cn)[2] pnpm error docs:
ERR_PNPM_OUTDATED_LOCKFILEcause + fix. (pnpm.cn)Citations:
Use
--frozen-lockfilefor deterministic container image builds.At Line 11,
pnpm installwithout--frozen-lockfilecan modify the lockfile during builds, breaking reproducibility. Even though pnpm defaults to frozen-lockfile behavior in CI environments with an existing lockfile, Dockerfile builds should explicitly enforce it to prevent dependency resolution drift across rebuilds of the same commit.Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents