mirror of
https://github.com/soconnor0919/personal-website.git
synced 2025-12-12 23:04:43 -05:00
Remove Docker configuration files and start-database script; update CV and resume links to GitHub releases; replace PDF object with iframe for better rendering
This commit is contained in:
38
Dockerfile
38
Dockerfile
@@ -1,38 +0,0 @@
|
||||
# Use the Node.js 18 Alpine Linux image as the base image
|
||||
FROM node:22-alpine
|
||||
|
||||
# Install GraphicsMagick
|
||||
RUN apk add --no-cache graphicsmagick ghostscript
|
||||
|
||||
# Add LaTeX support
|
||||
RUN apk add --no-cache \
|
||||
texlive \
|
||||
texlive-latex \
|
||||
texlive-xetex \
|
||||
texmf-dist-latexextra
|
||||
|
||||
# Set the working directory inside the container to /app
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package.json and package-lock.json files into the working directory
|
||||
COPY package*.json ./
|
||||
|
||||
# Install the dependencies specified in package.json
|
||||
RUN npm install -g pnpm
|
||||
RUN pnpm install
|
||||
|
||||
# Copy all the files from the local directory to the working directory in the container
|
||||
COPY . .
|
||||
|
||||
# # Clear previous build artifacts
|
||||
# RUN rm -rf .next
|
||||
|
||||
# # Build the application
|
||||
# RUN pnpm build
|
||||
|
||||
# # Ensure correct permissions
|
||||
# RUN chown -R node:node .
|
||||
# USER node
|
||||
|
||||
# Run the application in development mode
|
||||
CMD ["pnpm", "run", "dev"]
|
||||
@@ -1,37 +0,0 @@
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- '3000:3000' # Node.js
|
||||
# - '4983:4983' # Drizzle Studio
|
||||
volumes:
|
||||
- .:/app
|
||||
- /app/node_modules
|
||||
environment:
|
||||
NODE_ENV: development
|
||||
command: ["sh", "-c", "pnpm db:push && pnpm run dev"]
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
db:
|
||||
image: postgres
|
||||
restart: always
|
||||
# ports:
|
||||
# - 5432:5432 # DEBUG
|
||||
volumes:
|
||||
- postgres:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
|
||||
adminer:
|
||||
image: adminer
|
||||
restart: always
|
||||
ports:
|
||||
- 8080:8080
|
||||
|
||||
volumes:
|
||||
postgres:
|
||||
@@ -13,10 +13,8 @@ const nextConfig = {
|
||||
},
|
||||
},
|
||||
webpack: (config) => {
|
||||
config.externals.push({
|
||||
"utf-8-validate": "commonjs utf-8-validate",
|
||||
bufferutil: "commonjs bufferutil",
|
||||
});
|
||||
config.resolve.alias.canvas = false;
|
||||
config.resolve.alias.encoding = false;
|
||||
return config;
|
||||
},
|
||||
// Add this section to disable linting during build
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
"@radix-ui/react-tabs": "^1.1.1",
|
||||
"@radix-ui/react-toast": "^1.2.2",
|
||||
"@radix-ui/react-tooltip": "^1.1.3",
|
||||
"@react-pdf/renderer": "^4.0.0",
|
||||
"@react-pdf/renderer": "^4.1.5",
|
||||
"@t3-oss/env-nextjs": "^0.11.1",
|
||||
"@vercel/analytics": "^1.3.2",
|
||||
"@vercel/speed-insights": "^1.0.14",
|
||||
@@ -34,10 +34,12 @@
|
||||
"lucide-react": "^0.454.0",
|
||||
"next": "^15.0.2",
|
||||
"next-themes": "^0.3.0",
|
||||
"pdfjs-dist": "^4.9.155",
|
||||
"radix-ui": "^1.0.1",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-icons": "^5.3.0",
|
||||
"react-pdf": "^9.1.1",
|
||||
"sharp": "^0.33.5",
|
||||
"spawn-sync": "^2.0.0",
|
||||
"tailwind-merge": "^2.5.4",
|
||||
|
||||
1536
pnpm-lock.yaml
generated
1536
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
BIN
public/cv.pdf
BIN
public/cv.pdf
Binary file not shown.
7
public/pdf.worker.min.js
vendored
Normal file
7
public/pdf.worker.min.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<html>
|
||||
<head><title>404 Not Found</title></head>
|
||||
<body>
|
||||
<center><h1>404 Not Found</h1></center>
|
||||
<hr><center>nginx</center>
|
||||
</body>
|
||||
</html>
|
||||
Binary file not shown.
@@ -7,6 +7,10 @@ import { Card, CardHeader, CardContent, CardTitle, CardDescription } from '~/com
|
||||
import { Download } from 'lucide-react';
|
||||
import Link from 'next/link';
|
||||
|
||||
// GitHub release URLs for PDFs
|
||||
const CV_URL = "https://github.com/soconnor0919/resume-cv/releases/download/latest/cv.pdf";
|
||||
const RESUME_URL = "https://github.com/soconnor0919/resume-cv/releases/download/latest/resume.pdf";
|
||||
|
||||
export default function CVPage() {
|
||||
const [activeTab, setActiveTab] = useState('cv');
|
||||
|
||||
@@ -27,9 +31,11 @@ export default function CVPage() {
|
||||
|
||||
<TabsContent value="cv">
|
||||
<div className="bg-background shadow-sm rounded-lg overflow-hidden">
|
||||
<object
|
||||
data="/cv.pdf"
|
||||
type="application/pdf"
|
||||
<iframe
|
||||
src={`https://docs.google.com/viewer?url=${encodeURIComponent(CV_URL)}&embedded=true`}
|
||||
width="100%"
|
||||
height="600"
|
||||
style={{ border: 'none' }}
|
||||
className="w-full h-[calc(100vh-21rem)] lg:h-[calc(100vh-18rem)]"
|
||||
>
|
||||
<Card>
|
||||
@@ -44,7 +50,7 @@ export default function CVPage() {
|
||||
<CardContent>
|
||||
<div className="flex flex-wrap gap-2 mt-2">
|
||||
<Link
|
||||
href="/cv.pdf"
|
||||
href={CV_URL}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
@@ -56,18 +62,19 @@ export default function CVPage() {
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</object>
|
||||
</iframe>
|
||||
</div>
|
||||
</TabsContent>
|
||||
|
||||
<TabsContent value="resume">
|
||||
<div className="bg-background shadow-sm rounded-lg overflow-hidden">
|
||||
<object
|
||||
data="/resume.pdf"
|
||||
type="application/pdf"
|
||||
<iframe
|
||||
src={`https://docs.google.com/viewer?url=${encodeURIComponent(RESUME_URL)}&embedded=true`}
|
||||
width="100%"
|
||||
height="600"
|
||||
style={{ border: 'none' }}
|
||||
className="w-full h-[calc(100vh-21rem)] lg:h-[calc(100vh-18rem)]"
|
||||
>
|
||||
|
||||
<Card>
|
||||
<CardHeader className="pb-2">
|
||||
<div className="flex items-center justify-between">
|
||||
@@ -80,7 +87,7 @@ export default function CVPage() {
|
||||
<CardContent>
|
||||
<div className="flex flex-wrap gap-2 mt-2">
|
||||
<Link
|
||||
href="/resume.pdf"
|
||||
href={RESUME_URL}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
@@ -92,7 +99,7 @@ export default function CVPage() {
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</object>
|
||||
</iframe>
|
||||
</div>
|
||||
</TabsContent>
|
||||
</Tabs>
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Use this script to start a docker container for a local development database
|
||||
|
||||
# TO RUN ON WINDOWS:
|
||||
# 1. Install WSL (Windows Subsystem for Linux) - https://learn.microsoft.com/en-us/windows/wsl/install
|
||||
# 2. Install Docker Desktop for Windows - https://docs.docker.com/docker-for-windows/install/
|
||||
# 3. Open WSL - `wsl`
|
||||
# 4. Run this script - `./start-database.sh`
|
||||
|
||||
# On Linux and macOS you can run this script directly - `./start-database.sh`
|
||||
|
||||
DB_CONTAINER_NAME="personal-website-postgres"
|
||||
|
||||
if ! [ -x "$(command -v docker)" ]; then
|
||||
echo -e "Docker is not installed. Please install docker and try again.\nDocker install guide: https://docs.docker.com/engine/install/"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$(docker ps -q -f name=$DB_CONTAINER_NAME)" ]; then
|
||||
echo "Database container '$DB_CONTAINER_NAME' already running"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$(docker ps -q -a -f name=$DB_CONTAINER_NAME)" ]; then
|
||||
docker start "$DB_CONTAINER_NAME"
|
||||
echo "Existing database container '$DB_CONTAINER_NAME' started"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# import env variables from .env
|
||||
set -a
|
||||
source .env
|
||||
|
||||
DB_PASSWORD=$(echo "$DATABASE_URL" | awk -F':' '{print $3}' | awk -F'@' '{print $1}')
|
||||
DB_PORT=$(echo "$DATABASE_URL" | awk -F':' '{print $4}' | awk -F'\/' '{print $1}')
|
||||
|
||||
if [ "$DB_PASSWORD" = "password" ]; then
|
||||
echo "You are using the default database password"
|
||||
read -p "Should we generate a random password for you? [y/N]: " -r REPLY
|
||||
if ! [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo "Please change the default password in the .env file and try again"
|
||||
exit 1
|
||||
fi
|
||||
# Generate a random URL-safe password
|
||||
DB_PASSWORD=$(openssl rand -base64 12 | tr '+/' '-_')
|
||||
sed -i -e "s#:password@#:$DB_PASSWORD@#" .env
|
||||
fi
|
||||
|
||||
docker run -d \
|
||||
--name $DB_CONTAINER_NAME \
|
||||
-e POSTGRES_USER="postgres" \
|
||||
-e POSTGRES_PASSWORD="$DB_PASSWORD" \
|
||||
-e POSTGRES_DB=personal-website \
|
||||
-p "$DB_PORT":5432 \
|
||||
docker.io/postgres && echo "Database container '$DB_CONTAINER_NAME' was successfully created"
|
||||
Reference in New Issue
Block a user