Compare commits

...
10 Commits
10 changed files with 1633 additions and 12 deletions
+3 -1
View File
@@ -33,4 +33,6 @@ jobs:
# Connects to your server via ssh and runs the deploy bash script # Connects to your server via ssh and runs the deploy bash script
- name: Run Deploy Script - name: Run Deploy Script
run: ssh -i ~/.ssh/id_rsa prod@${{secrets.IP_ADDRESS}} sh portfolio/portfolio-deploy.sh run: |
ssh -i ~/.ssh/id_rsa prod@${{secrets.IP_ADDRESS}} sh deploy.sh portfolio-client
ssh -i ~/.ssh/id_rsa prod@${{secrets.IP_ADDRESS}} sh deploy.sh portfolio-server
+9 -7
View File
@@ -18,21 +18,23 @@ See:
<h4>Development Environment</h4> <h4>Development Environment</h4>
``` ```
git clone https://github.com/quaxlyqueen/portfolio git clone https://github.com/joshashtondev/portfolio
cd portfolio cd portfolio/server
npm install
node src/server.js & node src/server.js &
cd ../client
npm install
npm start npm start
``` ```
<h4>Production Environment</h4> <h4>Production Environment</h4>
``` ```
git clone https://github.com/quaxlyqueen/portfolio git clone https://github.com/joshashtondev/portfolio
cd portfolio cd portfolio/server
node src/server.js &
cd ../client
npm run build npm run build
cd dist cd dist
node ../src/server.js &
serve -s serve -s
``` ```
@@ -91,7 +93,7 @@ serve -s
- [X] CI/CD (v.0.0.2) - [X] CI/CD (v.0.0.2)
- [ ] Security: - [ ] Security:
- [ ] Separate user for self-hosting, with reduced permissions. (v.0.0.2) - [ ] Separate user for self-hosting, with reduced permissions. (v.0.0.2)
- [ ] Dockerize (v.0.0.2) - [x] Dockerize (v.0.0.2)
- [ ] .down-indicator popup text on hover, "scroll down to see my projects!" - [ ] .down-indicator popup text on hover, "scroll down to see my projects!"
- [ ] Rewrite CSS into components/modules (v.0.0.2) - [ ] Rewrite CSS into components/modules (v.0.0.2)
- [ ] Read in data for portfolio a plain text files. (v.0.0.2) - [ ] Read in data for portfolio a plain text files. (v.0.0.2)
+1 -1
View File
@@ -2,7 +2,7 @@ FROM node:18-alpine
WORKDIR /app WORKDIR /app
COPY package.json./ /app COPY package.json /app
RUN npm install RUN npm install
View File
+1
View File
@@ -1,6 +1,7 @@
{ {
"name": "Portfolio Email Server", "name": "Portfolio Email Server",
"version": "0.0.1", "version": "0.0.1",
"type": "module",
"scripts": { "scripts": {
"start": "node server.js" "start": "node server.js"
}, },
@@ -1,8 +1,6 @@
import express from "express"; import express from "express";
import cors from "cors"; import cors from "cors";
import postmark from "postmark"; import postmark from "postmark";
import * as dotenv from 'dotenv';
dotenv.config();
const app = express(); const app = express();
const port = 3001; // Example port const port = 3001; // Example port
+4 -1
View File
@@ -5,17 +5,20 @@ FROM node:18-alpine
WORKDIR /app WORKDIR /app
# Copy package.json and package-lock.json # Copy package.json and package-lock.json
COPY index.html /app
COPY package.json /app COPY package.json /app
# Install dependencies # Install dependencies
RUN npm install RUN npm install
# Copy the rest of the React app # Copy the rest of the React app
COPY src/. /app COPY src/. /app/src/
# Build the React app for production # Build the React app for production
RUN npm run build RUN npm run build
COPY public/images/. /app/dist/images/
# Expose the port your React app will run on (usually 3000) # Expose the port your React app will run on (usually 3000)
EXPOSE 3000 EXPOSE 3000
+1591
View File
File diff suppressed because it is too large Load Diff
+18
View File
@@ -0,0 +1,18 @@
---
services:
portfolio:
build: $HOME/portfolio/client
container_name: portfolio
restart: unless-stopped
ports:
- "3000:3000"
depends_on:
- portfolio_api
portfolio_api:
build: $HOME/portfolio/api
container_name: portfolio_api
restart: unless-stopped
ports:
- "3001:3001"
+6
View File
@@ -0,0 +1,6 @@
{
"name": "portfolio",
"lockfileVersion": 3,
"requires": true,
"packages": {}
}