Skip to content

Commit

Permalink
build: 📦 update settings for build
Browse files Browse the repository at this point in the history
  • Loading branch information
miragecentury committed Aug 23, 2024
1 parent 9dbb512 commit 4a758a2
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@
"files.trimTrailingWhitespace": true,
"files.trimTrailingWhitespaceInRegexAndStrings": true,
"files.insertFinalNewline": true,
"editor.tabSize": 4
"editor.tabSize": 4,
}
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
version: "3"

services:
otel_collector:
image: otel/opentelemetry-collector:latest
volumes:
- ./docker/otel-collector/otel-collector-config.yaml:/etc/otel-collector-config.yaml
ports:
- "4317:4317"
networks:
- devcontainer
- default
application:
build:
context: .
dockerfile: Dockerfile
ports:
- "8000:8000"
networks:
- devcontainer
- default

networks:
devcontainer:
Expand Down
2 changes: 1 addition & 1 deletion project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ id = "info.sysunicorns.python_factory_example"
version = "0.1.0"

[io.buildpacks]
exclude = [".venv"]
exclude = [".venv", ".devcontainer", ".github", ".mypy_cache", "build"]
48 changes: 17 additions & 31 deletions skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,45 +1,31 @@
apiVersion: skaffold/v4beta11
kind: Config
metadata:
name: python-poetry-empty
name: python_factory_example
build:
hooks:
before:
- command: ["pre-commit", "run", "--all-files"]

after: []
artifacts:
- image: python-poetry-empty
hooks:
before:
- command: ["mkdir", "-p", "build/wheels"]
- command: ["poetry","export", "--no-interaction", "--format=requirements.txt", "--output=build/requirements.txt"]
- command: ["poetry","build", "--no-interaction", "--format=wheel", "--output=build/wheels"]
- command:
- "pip"
- "wheel"
- "--no-cache-dir"
- "--prefer-binary"
- "--require-hashes"
- "-r"
- "build/requirements.txt"
- --cache-dir
- "build/.pip-cache"
- "-w"
- "build/wheels"
- image: python_factory_example
context: .
runtimeType: python
docker:
cacheFrom:
- docker.io/library/python:3.12.4-slim-bullseye
dockerfile: "Dockerfile"
buildArgs:
DEV: "false"
buildpacks:
clearCache: false
projectDescriptor: project.toml
trustBuilder: true
builder: paketobuildpacks/builder-jammy-base
buildpacks:
- paketo-buildpacks/python

# docker:
# cacheFrom:
# - docker.io/library/python:3.12.4-slim-bullseye
# dockerfile: "Dockerfile"
# buildArgs:
# DEV: "false"
local:
push: false
useBuildkit: true
deploy:
docker:
useCompose: false
images:
- python-poetry-empty
- python_factory_example

0 comments on commit 4a758a2

Please sign in to comment.