-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added docker-compose setup (#35)
* chore: added log for request object * fix: api url in form * chore: updated console log * feat: enabled vercel analytics * chore: removed dotenv * feat: stricter request blocking in production mode * feat: added docker-compose setup * fix: formatting errors * feat: integrated husky
- Loading branch information
Showing
8 changed files
with
1,097 additions
and
1,075 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,16 @@ | ||
{ | ||
"name": "Sarthik's Portfolio Website", | ||
"dockerComposeFile": "../deployment/dev/docker-compose.yaml", | ||
"service": "app_server", | ||
"workspaceFolder": "/app", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"astro-build.astro-vscode", | ||
"dbaeumer.vscode-eslint", | ||
"ms-vscode.vscode-typescript-next", | ||
"esbenp.prettier-vscode" | ||
] | ||
} | ||
} | ||
} |
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,25 @@ | ||
name: Inspection & Test | ||
on: | ||
pull_request: | ||
branches: | ||
- "master" | ||
- "release/**" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout the code on the runner | ||
- uses: actions/checkout@v3 | ||
# Install Node.js | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
# Install dependencies | ||
- run: npm ci | ||
# Check Formatting | ||
- run: npm run format:check | ||
# Check linting | ||
- run: npm run lint:check | ||
# Run tests | ||
# - run: npm test |
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 @@ | ||
FROM node:20 | ||
|
||
# Set the working dir inside the image | ||
WORKDIR /app | ||
|
||
# Copy the startup script & give executable permission | ||
COPY ./deployment/dev /app/deployment/dev | ||
RUN chmod +x /app/deployment/dev/startup-script.sh | ||
|
||
# Copy the project dependencies | ||
COPY ./package.json /app | ||
COPY ./package-lock.json /app | ||
|
||
# Copy Environment Variables | ||
COPY ./deployment/dev/.env ./.env.development | ||
|
||
# Install the packages | ||
RUN npm install |
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,27 @@ | ||
version: "3" | ||
services: | ||
app_server: | ||
build: | ||
context: ../../ | ||
dockerfile: ./deployment/dev/Dockerfile | ||
container_name: app_server | ||
ports: | ||
- 4321:4321 | ||
volumes: | ||
- ../../:/app | ||
- /app/node_modules | ||
- ~/.ssh:/root/.ssh | ||
- ~/.gitconfig:/root/.gitconfig | ||
command: ["bash", "./deployment/dev/startup-script.sh"] | ||
stdin_open: true | ||
tty: true | ||
mailcatcher: | ||
image: mailhog/mailhog:latest | ||
container_name: mailcatcher | ||
ports: | ||
- 1025:1025 | ||
- 1080:8025 | ||
environment: | ||
SMTP_PORT: 1025 | ||
SMTP_USERNAME: [email protected] | ||
SMTP_PASSWORD: password |
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,9 @@ | ||
#!/bin/bash | ||
|
||
echo Load Environment Variables | ||
echo "set -o allexport" >> ~/.bashrc | ||
echo "source ./deployment/dev/.env" >> ~/.bashrc | ||
echo "set +o allexport" >> ~/.bashrc | ||
source ~/.bashrc | ||
|
||
/bin/bash |
Oops, something went wrong.