Skip to content

Commit

Permalink
Fix heroku Dockerfile location
Browse files Browse the repository at this point in the history
Heroku does not allow changing of build context and sets it to the
folder containing the Dockerfile. Hence the files have been moved
to project root
  • Loading branch information
blenderskool committed Nov 24, 2021
1 parent 118a011 commit d5d8c70
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
7 changes: 7 additions & 0 deletions heroku-docker.start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

/usr/bin/redis-server &
npm run start &

wait -n
exit $?
8 changes: 4 additions & 4 deletions heroku/Dockerfile → heroku.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM node:14-alpine as app

WORKDIR /app
COPY ../ ../
COPY ./ ./

ENV SECRETS_KEY=
ENV SECRETS_IV=
Expand All @@ -13,7 +13,7 @@ EXPOSE 3000

RUN apk --update add redis

COPY ./start.sh ./
RUN chmod +x ./start.sh
COPY ./heroku-docker.start.sh ./
RUN chmod +x ./heroku-docker.start.sh

CMD ["sh", "./start.sh"]
CMD ["sh", "./heroku-docker.start.sh"]
2 changes: 1 addition & 1 deletion heroku.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ setup:

build:
docker:
web: heroku/Dockerfile
web: heroku.Dockerfile

release:
image: web
Expand Down
9 changes: 0 additions & 9 deletions heroku/start.sh

This file was deleted.

1 comment on commit d5d8c70

@vercel
Copy link

@vercel vercel bot commented on d5d8c70 Nov 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.