Skip to content

Commit

Permalink
fix: use docker copmose projen template
Browse files Browse the repository at this point in the history
  • Loading branch information
mmuller88 committed Jan 23, 2021
1 parent 18aff0d commit 031ead4
Show file tree
Hide file tree
Showing 14 changed files with 81 additions and 65 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".

name: Build
on:
pull_request: {}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/push-docker.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".

name: push-docker
on:
push:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/rebuild-bot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".

name: rebuild-bot
on:
issue_comment:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".

name: Release
on:
push:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ yarn-error.log*
!/.projenrc.js
!/.versionrc.json
!/LICENSE
!/docker-compose.yml
!/package.json
!version.json
!version.json
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
/.versionrc.json
/coverage
/test-reports/
junit.xml
junit.xml
4 changes: 2 additions & 2 deletions .projen/deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
{
"name": "projen",
"version": "^0.14.6",
"version": "^0.15.11",
"type": "build"
},
{
Expand All @@ -21,4 +21,4 @@
}
],
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"."
}
}
2 changes: 1 addition & 1 deletion .projen/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,4 @@
"PATH": "$(npx -c \"node -e \\\"console.log(process.env.PATH)\\\"\")"
},
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"."
}
}
52 changes: 26 additions & 26 deletions .projenrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,31 +80,31 @@ dockerPush.on({
workflow_dispatch: {},
})

// new DockerCompose(project, {
// version: '3.3',
// services: {
// influxdb:{
// // container_na me: influxdb,
// image: "influxdb:latest",
// environment: {
// INFLUXDB_DB: 'mydb',
// INFLUXDB_BIND_ADDRESS: '0.0.0.0:8088',
// },
// },
// influxdbs3backup: {
// imageBuild: {
// context: '.',
// },
// environment: {
// DATABASE: 'mydb',
// DATABASE_HOST: 'influxdb',
// S3_BUCKET: 'mybackupbucket',
// AWS_ACCESS_KEY_ID: 'AKIAIOSFODNN7EXAMPLE',
// AWS_SECRET_ACCESS_KEY: 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY',
// AWS_DEFAULT_REGION: 'us-west-2',
// },
// },
// },
// });
new DockerCompose(project, {
version: '3.3',
services: {
influxdb:{
// container_na me: influxdb,
image: "influxdb:latest",
environment: {
INFLUXDB_DB: 'mydb',
INFLUXDB_BIND_ADDRESS: '0.0.0.0:8088',
},
},
influxdbs3backup: {
imageBuild: {
context: '.',
},
environment: {
DATABASE: 'mydb',
DATABASE_HOST: 'influxdb',
S3_BUCKET: 'rasp4backup',
// AWS_ACCESS_KEY_ID: '',
// AWS_SECRET_ACCESS_KEY: '',
AWS_DEFAULT_REGION: 'us-west-2',
},
},
},
});

project.synth();
2 changes: 1 addition & 1 deletion .versionrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
"scripts": {
"postbump": "npx projen && git add ."
}
}
}
18 changes: 18 additions & 0 deletions docker-compose-ori.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: '3.3'

services:
influxdb:
image: influxdb:latest
environment:
INFLUXDB_DB: mydb
INFLUXDB_BIND_ADDRESS: 0.0.0.0:8088
influxdbs3backup:
build:
context: .
environment:
- DATABASE=mydb
- DATABASE_HOST=influxdb
- S3_BUCKET=rasp4backup
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_DEFAULT_REGION=eu-central-1
12 changes: 5 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: '3.3'

version: "3.3"
services:
influxdb:
image: influxdb:latest
Expand All @@ -10,9 +10,7 @@ services:
build:
context: .
environment:
- DATABASE=mydb
- DATABASE_HOST=influxdb
- S3_BUCKET=rasp4backup
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_DEFAULT_REGION=eu-central-1
DATABASE: mydb
DATABASE_HOST: influxdb
S3_BUCKET: rasp4backup
AWS_DEFAULT_REGION: us-west-2
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"devDependencies": {
"jest": "^26.6.3",
"jest-junit": "^12",
"projen": "^0.14.6",
"projen": "^0.15.11",
"standard-version": "^9.0.0"
},
"bundledDependencies": [],
Expand Down
45 changes: 20 additions & 25 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,9 @@
integrity sha512-T8TbSnGsxo6TDBJx/Sgv/BlVJL3tshxZP7Aq5R1mSnM5OcHY2dQaxLMu2+E8u3gN0MLOzdjurqN4ZRVuzQycOQ==

"@sinonjs/commons@^1.7.0":
version "1.8.1"
resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.1.tgz#e7df00f98a203324f6dc7cc606cad9d4a8ab2217"
integrity sha512-892K+kWUUi3cl+LlqEWIDrhvLgdL79tECi8JZUyq6IviKy/DNhuzCRlbHUjxK89f4ypPMMaFnFuR9Ie6DoIMsw==
version "1.8.2"
resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.2.tgz#858f5c4b48d80778fde4b9d541f27edc0d56488b"
integrity sha512-sruwd86RJHdsVf/AtBoijDmUqJp3B6hF/DGC23C+JaegnDHaZyewCjoVGTdg3J0uz3Zs7NnIT05OBOmML72lQw==
dependencies:
type-detect "4.0.8"

Expand Down Expand Up @@ -578,9 +578,9 @@
integrity sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg==

"@types/node@*":
version "14.14.20"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.20.tgz#f7974863edd21d1f8a494a73e8e2b3658615c340"
integrity sha512-Y93R97Ouif9JEOWPIUyU+eyIdyRqQR0I8Ez1dzku4hDx34NWh4HbtIc3WNzwB1Y9ULvNGeu5B8h8bVL5cAk4/A==
version "14.14.22"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.22.tgz#0d29f382472c4ccf3bd96ff0ce47daf5b7b84b18"
integrity sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw==

"@types/[email protected]":
version "14.6.2"
Expand Down Expand Up @@ -1841,14 +1841,14 @@ fs-access@^1.0.1:
null-check "^1.0.0"

fs-extra@^9.0.1:
version "9.0.1"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc"
integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==
version "9.1.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d"
integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==
dependencies:
at-least-node "^1.0.0"
graceful-fs "^4.2.0"
jsonfile "^6.0.1"
universalify "^1.0.0"
universalify "^2.0.0"

fs.realpath@^1.0.0:
version "1.0.0"
Expand Down Expand Up @@ -3561,9 +3561,9 @@ parse-json@^4.0.0:
json-parse-better-errors "^1.0.1"

parse-json@^5.0.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.1.0.tgz#f96088cdf24a8faa9aea9a009f2d9d942c999646"
integrity sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==
version "5.2.0"
resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd"
integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==
dependencies:
"@babel/code-frame" "^7.0.0"
error-ex "^1.3.1"
Expand Down Expand Up @@ -3704,10 +3704,10 @@ process-nextick-args@~2.0.0:
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==

projen@^0.14.6:
version "0.14.6"
resolved "https://registry.yarnpkg.com/projen/-/projen-0.14.6.tgz#8caf006c607b0e2b79b42191be008be18d03d9ea"
integrity sha512-PgNnyvwERJwWD7SyG01R2n0MyXwS3mUZaVR3txzyT3kuzH+9rxLu9T8FT/FrmFqlxe4+9sU2GKWdti0ZwCBBLw==
projen@^0.15.11:
version "0.15.11"
resolved "https://registry.yarnpkg.com/projen/-/projen-0.15.11.tgz#1c0c930d694601bcccfd0abcf0ef63439b8fe4a7"
integrity sha512-k40uagBDqXZiDVOnUEPs2PBUyH52f2UnAPi0RDlELbeFg2mwK6r7NpT6jAbMSP7353+4wVcNA7kerksNarYV+w==
dependencies:
"@iarna/toml" "^2.2.5"
chalk "^4.1.0"
Expand Down Expand Up @@ -4659,9 +4659,9 @@ typedarray@^0.0.6:
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

uglify-js@^3.1.4:
version "3.12.4"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.12.4.tgz#93de48bb76bb3ec0fc36563f871ba46e2ee5c7ee"
integrity sha512-L5i5jg/SHkEqzN18gQMTWsZk3KelRsfD1wUVNqtq0kzqWQqcJjyL8yc1o8hJgRrWqrAl2mUFbhfznEIoi7zi2A==
version "3.12.5"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.12.5.tgz#83241496087c640efe9dfc934832e71725aba008"
integrity sha512-SgpgScL4T7Hj/w/GexjnBHi3Ien9WS1Rpfg5y91WXMj9SY997ZCQU76mH4TpLwwfmMvoOU8wiaRkIf6NaH3mtg==

union-value@^1.0.0:
version "1.0.1"
Expand All @@ -4673,11 +4673,6 @@ union-value@^1.0.0:
is-extendable "^0.1.1"
set-value "^2.0.1"

universalify@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d"
integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==

universalify@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717"
Expand Down

0 comments on commit 031ead4

Please sign in to comment.