-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
67 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,5 +37,6 @@ yarn-error.log* | |
!/.projenrc.js | ||
!/.versionrc.json | ||
!/LICENSE | ||
!/docker-compose.yml | ||
!/package.json | ||
!version.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
const { NodeProject, ProjectType, SampleReadme } = require('projen'); | ||
const { NodeProject, ProjectType, DockerCompose } = require('projen'); | ||
|
||
const project = new NodeProject({ | ||
authorAddress: '[email protected]', | ||
|
@@ -9,4 +9,23 @@ const project = new NodeProject({ | |
|
||
}); | ||
|
||
new DockerCompose(project, { | ||
version: '3.9', | ||
services: { | ||
influxdbs3backup: { | ||
imageBuild: { | ||
context: '.', | ||
}, | ||
environment: { | ||
DATABASE: 'mydatabase', | ||
DATABASE_HOST: '1.2.3.4', | ||
S3_BUCKET: 'mybackupbucket', | ||
AWS_ACCESS_KEY_ID: 'AKIAIOSFODNN7EXAMPLE', | ||
AWS_SECRET_ACCESS_KEY: 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY', | ||
AWS_DEFAULT_REGION: 'us-west-2', | ||
}, | ||
} | ||
}, | ||
}); | ||
|
||
project.synth(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"folders": [], | ||
"settings": {}, | ||
"editor.formatOnSave": true, | ||
"prettier.singleQuote": true, | ||
"prettier.trailingComma": "all", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
FROM influxdb:1.8.3 | ||
|
||
RUN apt update -y && apt install awscli -y | ||
RUN apt update -y && apt install awscli cron -y | ||
|
||
COPY influxdb-to-s3.sh /usr/bin/influxdb-to-s3 | ||
COPY influxdb-to-s3.sh /usr/bin/influxdb-to-s3.sh | ||
|
||
ENTRYPOINT ["/usr/bin/influxdb-to-s3"] | ||
CMD ["cron", "0 1 * * *"] | ||
ENTRYPOINT ["/usr/bin/influxdb-to-s3.sh"] | ||
CMD ["startcron"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ | |
... | ||
|
||
# Thanks To: | ||
... | ||
* Jacob Tomlinson https://github.com/jacobtomlinson/docker-influxdb-to-s3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
version: '3.3' | ||
|
||
services: | ||
influxdbs3backup: | ||
build: | ||
context: . | ||
environment: | ||
DATABASE: mydatabase | ||
DATABASE_HOST: localhost | ||
S3_BUCKET: mybackupbucket | ||
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE | ||
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY | ||
AWS_DEFAULT_REGION: us-west-2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters