2024-10-09 20:32:39 -04:00
._.
2024-10-08 15:36:08 -04:00
2024-08-07 22:31:59 -04:00
2024-08-07 23:20:36 -04:00
2024-10-07 23:09:18 -04:00
2024-10-09 20:32:39 -04:00
2024-09-05 12:14:36 -04:00
2024-08-07 22:31:59 -04:00
2024-10-07 20:58:52 -04:00
2024-10-07 20:58:52 -04:00
2024-09-05 12:14:36 -04:00
2024-08-07 22:31:59 -04:00
2024-10-08 21:21:06 -04:00
2024-10-07 23:09:18 -04:00
2024-09-05 12:07:22 -04:00
2024-09-05 12:07:22 -04:00
2024-09-05 12:07:22 -04:00
2024-10-08 21:21:06 -04:00
2024-09-27 22:57:30 -04:00

Portfolio Website

Setup

Domain Records

Create two A records, one for the web side of the website and one for the api side of the website. Ideally, the records should look something like myportfolio.example.com for the web side and api.myportfolio.example.com, but it is not important.

Reverse Proxy

  • It doesn't matter what reverse proxy you use (Nginx, Apache, Traefik, Caddy, etc)
  1. Point the web domain to the web port (default: 8910)
  2. Point the api domain to the api port (default: 8911)

Gmail App Password

  1. Go to your Google account dashboard
  2. Go to Security > 2-Step Verification > App Passwords > Create a new app password
  3. Copy the 16 character password

Docker Compose

version: '3.8'

services:
  portfolio:
    container_name: portfolio
    image: git.altaiar.dev/ahmed/portfolio:latest
    environment:
      - NODE_ENV=production
      - API_PROXY_TARGET=http://localhost:8911
      - MAX_HTTP_CONNECTIONS_PER_MINUTE=60
      - SESSION_SECRET=super_secret_session_key_change_me_in_production_please
      - DATABASE_URL=postgresql://redwood:redwood@db:5432/portfolio
      - FIRST_NAME=first name                               # Your first name
      - LAST_NAME=lastname                                  # Your last name
      - GMAIL=example@gmail.com                             # The Gmail address associated with the app password created earlier
      - GMAIL_SMTP_PASSWORD=aaaa bbbb cccc dddd             # The app password created earlier
      - DOMAIN=portfolio.example.com
      - API_DOMAIN=api.portfolio.example.com
                                                            # Careful, addresses below must not end with a '/'
      - ADDRESS_PROD=https://portfolio.example.com          # https://DOMAIN
      - API_ADDRESS_PROD=https://api.portfolio.example.com  # https://API_DOMAIN
    ports:
      - '8910:8910' # Web
      - '8911:8911' # API
    depends_on:
      - db
    command: >
      /bin/sh -c "
      yarn rw build &&
      yarn rw prisma migrate deploy &&
      yarn rw prisma db seed &&
      yarn rw serve"


  db:
    container_name: portfolio-db
    image: postgres:16-bookworm
    environment:
      POSTGRES_USER: redwood
      POSTGRES_PASSWORD: redwood
      POSTGRES_DB: portfolio
    ports:
      - '5432:5432'
    volumes:
      - postgres:/var/lib/postgresql/data

volumes:
  postgres:

Logging In

  • Once the container is up and running, head to /login (https://portfolio.example.com/login), default credentials are below
  • If you would like to change the password, head to /forgot-password (https://portfolio.example.com/forgot-password), the username is admin
    • If you correctly set up the Gmail app password, you should receive an email from yourself
    • It contains the link needed to change your password

Default Credentials

Username: admin

Password: GMAIL_SMTP_PASSWORD

Description
Deployable fullstack portfolio website using Docker
https://fallback.altaiar.dev
Readme 4.1 MiB
2025-05-01 22:14:37 -04:00
Languages
TypeScript 95.2%
JavaScript 2.6%
Dockerfile 1.7%
HTML 0.3%
CSS 0.2%