-
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.
- Loading branch information
Showing
3 changed files
with
34 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM node:19-alpine | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json . | ||
COPY package-lock.json . | ||
|
||
RUN npm install | ||
|
||
COPY . . | ||
|
||
EXPOSE 3012 | ||
CMD npm 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"redirectUrl": "http://localhost:3000/", | ||
"port": 3000 | ||
} | ||
"redirectUrl": "https://bitly.mazettt.fr/", | ||
"port": 3012 | ||
} |
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,18 @@ | ||
#!/bin/bash | ||
|
||
if [[ $1 == "-h" ]]; then | ||
echo "Use -b if you want to build the image before starting the app" | ||
echo "Use -rm if you want to remove the running container" | ||
exit 0 | ||
fi | ||
|
||
if [[ $1 == "-rm" ]]; then | ||
docker stop mazettt-bitly | ||
docker rm mazettt-bitly | ||
fi | ||
|
||
if [[ $1 == "-b" ]]; then | ||
docker build -t mazettt:bitly . | ||
fi | ||
|
||
docker run --name="mazettt-bitly" --restart=always -d -p 3012:3012 mazettt:bitly |