Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] tutorial on how to run this on localhost in 30sc #2085

Open
1 task done
Kylvan-8 opened this issue Oct 25, 2024 · 6 comments
Open
1 task done

[Feature] tutorial on how to run this on localhost in 30sc #2085

Kylvan-8 opened this issue Oct 25, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request needs triage Issues that need to be triaged v4 Issues related to the latest version

Comments

@Kylvan-8
Copy link

Is there an existing issue for this feature?

  • Yes, I have searched the existing issues and it doesn't exist.

Feature Description

As said in the title.

Regards.

@Kylvan-8 Kylvan-8 added enhancement New feature or request needs triage Issues that need to be triaged v4 Issues related to the latest version labels Oct 25, 2024
@Roguinsura
Copy link

@Kylvan-8 drop your email, i can send you the steps

@Kylvan-8
Copy link
Author

@Kylvan-8 drop your email, i can send you the steps

Send it here, it could help many others !

Thank you for your help :)

@SunFlowerOwl
Copy link

SunFlowerOwl commented Oct 29, 2024

That one worked for me: I've to give the credit to https://belginux.com/reactive-resume/ (Not working but the base is good enough) and chatgpt:

Create in your-reactive-resume-folder the file ".env":

# Ports
APP_PORT=3000
MINIO_PORT=9000

# PostgreSQL
POSTGRES_PASSWORD=your_postgres_password

# MinIO
MINIO_ROOT_USER=minioadmin
MINIO_ROOT_PASSWORD=minioadmin

# Redis
REDIS_PASSWORD=your_redis_password

# Security Tokens
CHROME_TOKEN=your_chrome_token
ACCESS_TOKEN_SECRET=your_access_token_secret
REFRESH_TOKEN_SECRET=your_refresh_token_secret

Use the command openssl rand -hex 32` in a terminal to generate the three token

Secondly in the same folder define the file "docker-compose.yaml":

version: "3.8"

services:
  # Database (Postgres)
  postgres:
    image: postgres:15-alpine
    restart: unless-stopped
    volumes:
      - postgres_data:/var/lib/postgresql/data
    environment:
      POSTGRES_DB: postgres
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
      interval: 10s
      timeout: 5s
      retries: 5

  # Storage (for image uploads)
  minio:
    image: minio/minio
    restart: unless-stopped
    command: server /data
    ports:
      - ${MINIO_PORT:-9000}:9000
    volumes:
      - minio_data:/data
    environment:
      MINIO_ROOT_USER: ${MINIO_ROOT_USER}
      MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}

  # Chrome Browser (for printing and previews)
  chrome:
    image: browserless/chrome:1.61.0-puppeteer-21.4.1
    restart: unless-stopped
    environment:
      TOKEN: ${CHROME_TOKEN}
      EXIT_ON_HEALTH_FAILURE: 1
      PRE_REQUEST_HEALTH_CHECK: 1

  # Redis (for cache & server session management)
  redis:
    image: redis:alpine
    restart: unless-stopped
    command: redis-server --requirepass ${REDIS_PASSWORD}

  # Main Application
  app:
    image: amruthpillai/reactive-resume:latest
    restart: unless-stopped
    ports:
      - ${APP_PORT:-3000}:3000
    depends_on:
      - postgres
      - minio
      - redis
      - chrome
    environment:
      # -- Environment Variables --
      PORT: 3000
      NODE_ENV: production

      # -- URLs --
      PUBLIC_URL: http://localhost:${APP_PORT:-3000}
      STORAGE_URL: http://localhost:${MINIO_PORT:-9000}

      # -- Printer (Chrome) --
      CHROME_TOKEN: ${CHROME_TOKEN}
      CHROME_URL: ws://chrome:3000

      # -- Database (Postgres) --
      DATABASE_URL: postgresql://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres

      # -- Auth --
      ACCESS_TOKEN_SECRET: ${ACCESS_TOKEN_SECRET}
      REFRESH_TOKEN_SECRET: ${REFRESH_TOKEN_SECRET}

      # -- Emails --
      MAIL_FROM: noreply@localhost

      # -- Storage (Minio) --
      STORAGE_ENDPOINT: minio
      STORAGE_PORT: ${MINIO_PORT:-9000}
      STORAGE_BUCKET: default
      STORAGE_ACCESS_KEY: ${MINIO_ROOT_USER}
      STORAGE_SECRET_KEY: ${MINIO_ROOT_PASSWORD}
      STORAGE_USE_SSL: 0

      # -- Cache (Redis) --
      REDIS_URL: redis://default:${REDIS_PASSWORD}@redis:6379

volumes:
  postgres_data:
  minio_data:

Open a terminal in the same folder and run docker compose up -d

@zarevskaya
Copy link

@SunFlowerOwl

Hi,
Thanks to your message I see that my tutorial is no longer up to date. I would like to use your method and credit you. If you have a contrary opinion, let me know.

@SunFlowerOwl
Copy link

@zarevskaya

Hi, no problem for me. Feel free to re-use.

@zarevskaya
Copy link

Thanks, it's done. Have a nice day!

aspitarl added a commit to aspitarl/Reactive-Resume that referenced this issue Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs triage Issues that need to be triaged v4 Issues related to the latest version
Projects
None yet
Development

No branches or pull requests

5 participants