Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Feat: add copyFiles for container python functions #1134

Closed
wants to merge 4 commits into from
Closed

Conversation

spoeck
Copy link

@spoeck spoeck commented Sep 24, 2024

If you define following python function in your sst.config.ts, the copyFiles are missing in the built container:

 const python = new sst.aws.Function("MyPythonFunction", {
      handler: "backend/python.handler",
      runtime: "python3.11", 
      url: true,
      copyFiles: [
        {
          from: "backend/src/mymodule.py",
          to: "backend/src/mymodule.py",
        },
        {
          from: "backend/src",
          to: "src",
        },
        {
          from: "backend/data/sample.csv",
          to: "sample.csv",
        },
      ],
      python: {
        container: true,
      },
    });

Now we copy the files defined in copyFiles into the root folder which the Dockerfile later on copies and build the python container with it.

@spoeck
Copy link
Author

spoeck commented Sep 24, 2024

This problem was fixed with #1091 by @walln
I close my PR

@spoeck spoeck closed this Sep 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant