-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from dxw/feature/add-dockerfile-and-docker-com…
…pose Add `Dockerfile` and `docker-compose.yml` files
- Loading branch information
Showing
8 changed files
with
43 additions
and
6 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
APP_ID=123456 | ||
PRIVATE_KEY_PATH=/path/to/app.private-key.pem | ||
PRIVATE_KEY= # Use `script/encode-key <path-to-pem-file>` to encode the private key | ||
CLIENT_ID=SomeClientId123 | ||
CLIENT_SECRET=secret | ||
WEBHOOK_SECRET=secret |
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,24 @@ | ||
FROM node:22.8.0-slim | ||
|
||
WORKDIR /towtruck | ||
VOLUME /data | ||
|
||
ARG APP_ID | ||
ARG PRIVATE_KEY | ||
ARG CLIENT_ID | ||
ARG CLIENT_SECRET | ||
ARG WEBHOOK_SECRET | ||
|
||
COPY . . | ||
|
||
RUN touch .env \ | ||
&& echo "APP_ID=$APP_ID" >> .env \ | ||
&& echo "PRIVATE_KEY=$PRIVATE_KEY" >> .env \ | ||
&& echo "CLIENT_ID=$CLIENT_ID" >> .env \ | ||
&& echo "CLIENT_SECRET=$CLIENT_SECRET" >> .env \ | ||
&& echo "WEBHOOK_SECRET=$WEBHOOK_SECRET" >> .env | ||
|
||
RUN npm install | ||
|
||
EXPOSE 3000 | ||
CMD [ "sh", "-c", "npm run seed && exec npm run start" ] |
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
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,5 @@ | ||
services: | ||
towtruck: | ||
build: . | ||
ports: | ||
- "3000:3000" |
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,3 @@ | ||
build: | ||
docker: | ||
web: Dockerfile |
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
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
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,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
cat $1 | openssl base64 | tr -d '\n' | ||
echo |