Excluding Files from Deployments with .epycbyteignore
The .epycbyteignore file is a powerful tool for managing deployments on Epycbyte. It allows you to specify which files and directories should be excluded during the deployment process.
Overview
The .epycbyteignore file works similarly to a .gitignore file but is specific to Epycbyte. By placing this file in your project's root directory, you can exclude certain files and directories from being uploaded or served on Epycbyte.
How It Works
- Default Exclusions: All files are excluded by default unless specified otherwise.
- Including Files: To include a file or directory, add its name prefixed with
!in the.epycbyteignorefile. - Structure: The file should be placed at the root level of your project.
Example Usage
To exclude specific files and directories:
.epycbyteignore image private.html
This will prevent the /image directory and /private.html file from being uploaded.
Advanced Use Cases
- Allowing Specific Files: Add
!file_nameto allow a specific file. - Ignoring All Files: Start with
/*to ignore all files in the root directory..epycbyteignore /* - Combining Rules: Use multiple lines to create complex rules.
Monorepos and Workflows
- In a monorepo, the
.epycbyteignorefile at the project root takes precedence over any other configuration. - If no
.epycbyteignoreis found, Epycbyte uses the one at the root level.
Best Practices
- Security: Use it to protect sensitive files like
private.html. - Efficiency: Upload only necessary files, reducing deployment size and improving speed.
- Compliance: Ensure compliance with specific project requirements by excluding unnecessary files.
By leveraging the .epycbyteignore file, you can streamline your deployment process while keeping your project secure and efficient.