mirror of
https://github.com/morten-olsen/github-backup.git
synced 2026-02-08 01:36:24 +01:00
Fixed file permissions
This commit is contained in:
@@ -9,7 +9,7 @@ RUN yarn bundle
|
|||||||
|
|
||||||
FROM node:alpine
|
FROM node:alpine
|
||||||
COPY entry.sh /entry.sh
|
COPY entry.sh /entry.sh
|
||||||
RUN chmod 711 /entry.sh && apk update && apk add git
|
RUN chmod 755 /entry.sh && apk update && apk add git
|
||||||
COPY --from=BuildEnv /app/dist /app
|
COPY --from=BuildEnv /app/dist /app
|
||||||
CMD ["schedule"]
|
CMD ["schedule"]
|
||||||
ENTRYPOINT ["/entry.sh"]
|
ENTRYPOINT ["/entry.sh"]
|
||||||
|
|||||||
@@ -37,3 +37,6 @@ You can also limit which repositories to back up using the environment variables
|
|||||||
| | | |-...
|
| | | |-...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Scheduled
|
||||||
|
|
||||||
|
If the container is started without a command it will run in scheduled mode. It will run every Sunday at 3 am. This can be overridden using `-e SCHEDULE="0 0 4 * * *"` (Runs at 4 am every day) using the cron time format
|
||||||
|
|||||||
@@ -9,7 +9,9 @@ run.action(runBackup)
|
|||||||
const schedule = program.command('schedule');
|
const schedule = program.command('schedule');
|
||||||
schedule.action(() => {
|
schedule.action(() => {
|
||||||
const schedule = process.env.SCHEDULE || '0 0 3 * * Sunday';
|
const schedule = process.env.SCHEDULE || '0 0 3 * * Sunday';
|
||||||
|
console.log(`Starting with schedule ${schedule}`)
|
||||||
cron.schedule(schedule, () => {
|
cron.schedule(schedule, () => {
|
||||||
|
console.log('Starting backup task')
|
||||||
runBackup().catch((err) => {
|
runBackup().catch((err) => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
process.exit(-1);
|
process.exit(-1);
|
||||||
|
|||||||
Reference in New Issue
Block a user