Compare commits
10
Commits
5bfaaff7f9
...
18858d6819
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
18858d6819 | ||
|
|
793a5395ef | ||
|
|
c446674432 | ||
|
|
915d8013aa | ||
|
|
6d14bf1c7a | ||
|
|
63e5e8d6bc | ||
|
|
36240bfe70 | ||
|
|
ef25b0aa69 | ||
|
|
0373c4d25f | ||
|
|
89abcebd1d |
@@ -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
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
|
|
||||||
Generated
+1591
File diff suppressed because it is too large
Load Diff
@@ -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"
|
||||||
Generated
+6
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"name": "portfolio",
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user