Skip to content

Commit

Permalink
fix(Dockerfile): copy tweets/README.md for initial setup
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Mar 6, 2019
1 parent ba82e07 commit 0430589
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ LABEL "maintainer"="Gregor Martynus (https://github.com/gr2m)"
COPY package*.json ./
RUN npm ci --only=production

# start
# copy required files
COPY lib .
RUN mkdir tweets
COPY tweets/README.md tweets/

# start
ENTRYPOINT ["node", "/index.js"]
2 changes: 1 addition & 1 deletion lib/push/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async function setup (state) {

// Create tweets/README.md file
// https://developer.github.com/v3/repos/contents/#create-a-file
const readmeContent = await fs.readFile(`tweets/README.md`)
const readmeContent = await fs.readFile('/tweets/README.md')
await request('PUT /repos/:owner/:repo/contents/:path', {
owner: payload.repository.owner.login,
repo: payload.repository.name,
Expand Down

0 comments on commit 0430589

Please sign in to comment.