Security News
Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
shipit-shared-copy
Advanced tools
Readme
A set of tasks for Shipit used for symlinking persistent (un-sourced) files and directories on deploy.
Based on the concept of linked_files
/linked_dirs
from Capistrano
Features:
shared
task is triggered on the updated
event from shipit-deployRoadmap
npm install shipit-shared
shipitfile.js
module.exports = function (shipit) {
require('shipit-deploy')(shipit);
require('shipit-shared')(shipit);
shipit.initConfig({
default: {
shared: {
overwrite: true,
dirs: [
'public/storage',
{
path: 'db',
overwrite: false,
chmod: '-R 777',
}
],
files: [
'config/environment.yml',
{
path: 'config/database.yml',
overwrite: false,
chmod: '755',
}
],
}
}
});
};
To trigger on the deploy published
event, you can simply deploy:
shipit staging deploy
Or you can run the tasks separately :
shipit staging shared
shipit staging shared:create-dirs
shipit staging shared:link
shipit staging shared:link:dirs
shipit staging shared:link:files
shipit.config.shared
shared.dirs
, shared.files
Type: Array
An array of files/directories to symlink into current
. String values inherit default settings, objects allow per-item configuration:
'public/storage'
{
path: 'db',
overwrite: true,
chmod: '-R 777'
}
path
Type: String
Path to the shared file/directory (relative to current
).
overwrite
Type: Boolean
If the target of the symlink exists in current
, remove it before creating symlink.
chmod
Type: String
Options passed to the chmod
command for the given path.
shared.basePath
Type: String
Default: path.join(shipit.config.deployTo, 'shared')
The path where your shared files reside.
shared.overwrite
Type: Boolean
Default: false
If true
, the target of your symlink (in current
), will be removed (via rm -rf) before creating the symlink. Under normal circumstances, this is fine, as files in current
have come directly from a git checkout.
If false
and the target of your symlink is a file or directory, and error is thrown and the task aborted.
The default setting of false
is a safety precaution to prevent unintentionally losing data. See https://github.com/timkelty/shipit-shared/issues/17
shared.symlinkPath
Type: String
Default: shared.basePath
The path that will serve as the source for your symlink. This is usually the same as shared.basePath
, however it can be necessary to set this in a chroot
environment.
shared.triggerEvent
Type: String
, Boolean
Default: updated
Trigger shared
task on given event name.
Set to false
to prevent task from listening to any events.
(note: Some part of shipit-shared besides initConfig needs to be run before it can listen for events)
shared
shared:prepare
shared:create-dirs
sharedDirsCreated
shared:set-permissions
sharedPermissionsSet
shared:link
shared:link-dirs
sharedFilesDirs
shared:link-files
sharedFilesLinked
shared:end
sharedEnd
MIT
FAQs
Copy unsourced files and directories, for Docker build.
The npm package shipit-shared-copy receives a total of 1 weekly downloads. As such, shipit-shared-copy popularity was classified as not popular.
We found that shipit-shared-copy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.