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

[Bug] Link for documentation for local deployment? #1683

Open
1 task done
justpankajdotcom opened this issue Dec 20, 2023 · 12 comments · May be fixed by #1849
Open
1 task done

[Bug] Link for documentation for local deployment? #1683

justpankajdotcom opened this issue Dec 20, 2023 · 12 comments · May be fixed by #1849
Assignees
Labels
bug Something isn't working needs triage Issues that need to be triaged v4 Issues related to the latest version

Comments

@justpankajdotcom
Copy link

justpankajdotcom commented Dec 20, 2023

Is there an existing issue for this?

  • Yes, I have searched the existing issues and none of them match my problem.

Product Variant

Cloud (http://rxresu.me)

Current Behavior

I tried to search for documentation for local self-hosted deployment in both open and closed issues and found couple of links, however, they all redirect to 404 - Page not found. Is the address changed? I can see comments from author in other issues mentioning the below links as latest as april-may 2022. Is the address changed after that?

I cannot find any relevant links for deployment here --> https://docs.rxresu.me/

https://docs.rxresu.me/deployment/ (This link mentioned by author in one of the issue for deployment doc doesn't work anymore)

Expected Behavior

The link should direct to deployment page

Steps To Reproduce

Go to https://docs.rxresu.me/deployment/

What browsers are you seeing the problem on?

Chrome

What template are you using?

None

Anything else?

No response

@justpankajdotcom justpankajdotcom added bug Something isn't working needs triage Issues that need to be triaged v4 Issues related to the latest version labels Dec 20, 2023
@ToshY
Copy link

ToshY commented Dec 20, 2023

I also couldn't find any recent/up-to-date docs, so I just thought for self-hosted option we'd probably have to figure it out ourselves by checking the tools/compose directory for examples, in combination with the .env.example. Still, some environment variables are not mentioned in the .env.example (like the one mentioned in #1640), so it's a bit of a puzzle to get it setup properly 🧩

Docs would definately help future users 👌

@justpankajdotcom
Copy link
Author

justpankajdotcom commented Dec 21, 2023

I also couldn't find any recent/up-to-date docs, so I just thought for self-hosted option we'd probably have to figure it out ourselves by checking the tools/compose directory for examples, in combination with the .env.example. Still, some environment variables are not mentioned in the .env.example (like the one mentioned in #1640), so it's a bit of a puzzle to get it setup properly 🧩

Docs would definately help future users 👌

@ToshY Yes, exactly. I tried with different setups but i cant get it working. If you are also trying and haven't been able to yet. Shall we connect somewhere outside, like discord if it is okay for you? Maybe with collaboration it will become easier. We can also publish what works for us, for future readers.

@ToshY
Copy link

ToshY commented Dec 21, 2023

Hey @justpankajdotcom 👋

I've finally got it fully working yesterday evening locally 🙂 Sure, I'm open to discuss it on Discord (see my github profile for username) and share my docker-compose.yml and .env.example with you before posting it here.

@justpankajdotcom
Copy link
Author

Hi @ToshY ,

Appreciate it. But I can't seem to search you there in discord with your username. Can you please check your privacy settings once?

@MelihDarcanxyz
Copy link

Hey @justpankajdotcom 👋

I've finally got it fully working yesterday evening locally 🙂 Sure, I'm open to discuss it on Discord (see my github profile for username) and share my docker-compose.yml and .env.example with you before posting it here.

Can you please share it here so everyone can take advantage of it? Thanks in advance.

@ToshY
Copy link

ToshY commented Dec 26, 2023

Hey @MelihDarcanxyz 👋

Sorry for the delayed response; I've been refining my setup the last couple of days to make it more production-friendly (with Traefik v2/v3). I'll post it in a couple of hours.


I have the following example project setup.

resume/
├── .env
└── docker-compose.yml

In my situation, I have already setup Traefik and therefore have defined an external network named proxy. This is not strictly necessary, and you can also just add a Traefik container to the stack, like was done in traefik-secure.yml.

resume/.env

###> Image versions ###
REACTIVE_RESUME_IMAGE_VERSION="v4.0.3"
BROWSERLESS_CHROME_IMAGE_VERSION="1.61-puppeteer-21.4.1"
POSTGRES_IMAGE_VERSION="15-alpine"
REDIS_IMAGE_VERSION="7.0"
###< Image versions ###

###> App ###
APP_DOMAIN="example.com"
###< App ###

###> Postgres ###
POSTGRES_HOST="postgres"
POSTGRES_PORT="5432"
POSTGRES_DATABASE="rxresume"
POSTGRES_USER=""
POSTGRES_PASSWORD=""
###< Postgres ###

###> Redis ###
REDIS_HOST="redis"
REDIS_PASSWORD=""
###< Redis ###

###> Chrome ###
# openssl rand -hex 32
BROWSERLESS_CHROME_TOKEN=""
BROWSERLESS_EXIT_ON_HEALTH_FAILURE="true"
BROWSERLESS_PRE_REQUEST_HEALTH_CHECK="true"
# For development, ignore certificate errors
BROWSERLESS_CHROME_DEFAULT_IGNORE_HTTPS_ERRORS="true"
### < Chrome ###

###> Reactive Resume ###
REACTIVE_RESUME_TZ="UTC"
REACTIVE_RESUME_NODE_ENV="production"
# Application will be available at `resume.example.com`; change this to your liking
REACTIVE_RESUME_PUBLIC_URL="https://resume.${APP_DOMAIN}"
REACTIVE_RESUME_DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DATABASE}"
# openssl rand 64 | openssl base64 -A
REACTIVE_RESUME_ACCESS_TOKEN_SECRET=""
# openssl rand 64 | openssl base64 -A
REACTIVE_RESUME_REFRESH_TOKEN_SECRET=""
REACTIVE_RESUME_CHROME_URL="ws://chrome:3000"
# `SMTP_URL` is only used for password recovery but is required to be set / not empty; however you can set it to `smtp://null` if you're going to use Google login
REACTIVE_RESUME_SMTP_URL=
REACTIVE_RESUME_MAIL_FROM="noreply@${APP_DOMAIN}"
REACTIVE_RESUME_STORAGE_PORT=
REACTIVE_RESUME_STORAGE_REGION=
REACTIVE_RESUME_STORAGE_BUCKET=
REACTIVE_RESUME_STORAGE_ACCESS_KEY=
REACTIVE_RESUME_STORAGE_SECRET_KEY=
REACTIVE_RESUME_STORAGE_USE_SSL="false"
REACTIVE_RESUME_STORAGE_ENDPOINT=
# `STORAGE_SKIP_CREATE_BUCKET` is undocumentend; see PR 1640; if you're S3 access key has no rights to create buckets, set this to `true`.
REACTIVE_RESUME_STORAGE_SKIP_CREATE_BUCKET="true"
REACTIVE_RESUME_STORAGE_URL=
REACTIVE_RESUME_REDIS_URL="redis://default:${REDIS_PASSWORD}@${REDIS_HOST}:6379"
REACTIVE_RESUME_VITE_SENTRY_DSN=
REACTIVE_RESUME_CROWDIN_PROJECT_ID=
REACTIVE_RESUME_CROWDIN_PERSONAL_TOKEN=
REACTIVE_RESUME_DISABLE_EMAIL_AUTH="TRUE"
REACTIVE_RESUME_VITE_DISABLE_SIGNUPS="TRUE"
REACTIVE_RESUME_GITHUB_CLIENT_ID=
REACTIVE_RESUME_GITHUB_CLIENT_SECRET=
# ${REACTIVE_RESUME_PUBLIC_URL}/api/auth/github/callback
REACTIVE_RESUME_GITHUB_CALLBACK_URL=
REACTIVE_RESUME_GOOGLE_CLIENT_ID=
REACTIVE_RESUME_GOOGLE_CLIENT_SECRET=
# ${REACTIVE_RESUME_PUBLIC_URL}/api/auth/google/callback
REACTIVE_RESUME_GOOGLE_CALLBACK_URL=
###< Reactive Resume ###

resume/docker-compose.yml

version: '3.9'

x-restart: &restart-stopped
  restart: unless-stopped

services:
  reactive-resume:
    image: amruthpillai/reactive-resume:${REACTIVE_RESUME_SERVER_IMAGE_VERSION:-latest}
    security_opt:
      - no-new-privileges:true
    restart: always
    depends_on:
      - postgres
      - redis
      - chrome
    environment:
      TZ: ${REACTIVE_RESUME_TZ:-UTC}
      NODE_ENV: ${REACTIVE_RESUME_NODE_ENV:-production}
      PUBLIC_URL: ${REACTIVE_RESUME_PUBLIC_URL:-http://localhost:3000}
      DATABASE_URL: ${REACTIVE_RESUME_DATABASE_URL:?}
      ACCESS_TOKEN_SECRET: ${REACTIVE_RESUME_ACCESS_TOKEN_SECRET:?}
      REFRESH_TOKEN_SECRET: ${REACTIVE_RESUME_REFRESH_TOKEN_SECRET:?}
      CHROME_TOKEN: ${BROWSERLESS_CHROME_TOKEN:?}
      CHROME_URL: ${REACTIVE_RESUME_CHROME_URL:-ws://chrome:3000}
      MAIL_FROM: ${REACTIVE_RESUME_MAIL_FROM:-noreploy@${APP_DOMAIN}}
      SMTP_URL: ${REACTIVE_RESUME_SMTP_URL:-smtp://null}
      STORAGE_URL: ${REACTIVE_RESUME_STORAGE_URL:-http://localhost:${REACTIVE_RESUME_STORAGE_PORT:-9000}/${STORAGE_BUCKET:-default}}
      STORAGE_ENDPOINT: ${REACTIVE_RESUME_STORAGE_ENDPOINT:-}
      STORAGE_PORT: ${REACTIVE_RESUME_STORAGE_PORT:-}
      STORAGE_REGION: ${REACTIVE_RESUME_STORAGE_REGION:-}
      STORAGE_BUCKET: ${REACTIVE_RESUME_STORAGE_BUCKET:-default}
      STORAGE_ACCESS_KEY: ${REACTIVE_RESUME_STORAGE_ACCESS_KEY:-}
      STORAGE_SECRET_KEY: ${REACTIVE_RESUME_STORAGE_SECRET_KEY:-}
      STORAGE_USE_SSL: ${REACTIVE_RESUME_STORAGE_USE_SSL:-false}
      STORAGE_SKIP_CREATE_BUCKET: ${REACTIVE_RESUME_STORAGE_SKIP_CREATE_BUCKET:-false}
      REDIS_URL: ${REACTIVE_RESUME_REDIS_URL:?}
      CROWDIN_PROJECT_ID: ${REACTIVE_RESUME_CROWDIN_PROJECT_ID:-}
      CROWDIN_PERSONAL_TOKEN: ${REACTIVE_RESUME_CROWDIN_PERSONAL_TOKEN:-}
      DISABLE_EMAIL_AUTH: ${REACTIVE_RESUME_DISABLE_EMAIL_AUTH:-true}
      VITE_DISABLE_SIGNUPS: ${REACTIVE_RESUME_VITE_DISABLE_SIGNUPS:-true}
      GITHUB_CLIENT_ID: ${REACTIVE_RESUME_GITHUB_CLIENT_ID:-}
      GITHUB_CLIENT_SECRET: ${REACTIVE_RESUME_GITHUB_CLIENT_SECRET:-}
      GITHUB_CALLBACK_URL: ${REACTIVE_RESUME_GITHUB_CALLBACK_URL:-http://localhost:5173/api/auth/github/callback}
      GOOGLE_CLIENT_ID: ${REACTIVE_RESUME_GOOGLE_CLIENT_ID:-}
      GOOGLE_CLIENT_SECRET: ${REACTIVE_RESUME_GOOGLE_CLIENT_SECRET:-}
      GOOGLE_CALLBACK_URL: ${REACTIVE_RESUME_GOOGLE_CALLBACK_URL:-http://localhost:5173/api/auth/google/callback}
    labels:
      traefik.enable: true
      traefik.docker.network: proxy
      traefik.http.routers.reactive-resume.tls: true
      traefik.http.routers.reactive-resume.entrypoints: websecure
      traefik.http.routers.reactive-resume.rule: Host(`resume.${APP_DOMAIN}`)
      traefik.http.routers.reactive-resume.service: reactive-resume
      traefik.http.services.reactive-resume.loadbalancer.server.port: 3000
      # Bypass `/artboard` route for chrome container to generate previews and PDFs (and builder in UI)
      traefik.http.routers.reactive-resume-bypass.tls: true
      traefik.http.routers.reactive-resume-bypass.entrypoints: websecure
      traefik.http.routers.reactive-resume-bypass.rule: Host(`resume.${APP_DOMAIN}`) && PathPrefix(`/artboard`)
      traefik.http.routers.reactive-resume-bypass.service: reactive-resume-bypass
      traefik.http.services.reactive-resume-bypass.loadbalancer.server.port: 3000
    networks:
      - reactive-resume
      - proxy

  chrome:
    image: browserless/chrome:${BROWSERLESS_CHROME_IMAGE_VERSION}
    <<: [*restart-stopped]
    environment:
      TOKEN: ${BROWSERLESS_CHROME_TOKEN:?}
      EXIT_ON_HEALTH_FAILURE: ${BROWSERLESS_EXIT_ON_HEALTH_FAILURE:-true}
      PRE_REQUEST_HEALTH_CHECK: ${BROWSERLESS_PRE_REQUEST_HEALTH_CHECK:-true}
      DEFAULT_IGNORE_HTTPS_ERRORS: ${DEFAULT_IGNORE_HTTPS_ERRORS:-true}
    networks:
      - reactive-resume

  redis:
    image: redis:${REDIS_IMAGE_VERSION}
    command: redis-server --requirepass ${REDIS_PASSWORD}
    <<: [*restart-stopped]
    environment:
      REDISCLI_AUTH: ${REDIS_PASSWORD}
    networks:
      - reactive-resume

  postgres:
    image: postgres:${POSTGRES_IMAGE_VERSION}
    <<: [*restart-stopped]
    environment:
      POSTGRES_DB: ${POSTGRES_DATABASE}
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
    volumes:
      - postgres:/var/lib/postgresql/data
    networks:
      - reactive-resume

  wait:
    image: waisbrot/wait
    environment:
      TARGETS: postgres:5432 redis:6379 chrome:3000 reactive-resume:3000
      TIMEOUT: 60
    networks:
      - reactive-resume

volumes:
  postgres:
    driver: local

networks:
  reactive-resume:
    driver: bridge
  proxy:
    external: true

Now what's left is to fill in the .env file with passwords/secrets/tokens and you'd should be good to go. I've added some inline notes to the .env and docker-compose.yml which are some clarifications to the issues I've encountered when setting this up in development and production.

Hope it helps.

Versions
Reactive Resume: v4.0.3
Traefik: 3.0.0-beta5
Docker Compose: v2.23.0

@N1KN1M
Copy link

N1KN1M commented Dec 29, 2023

The first section in CONTRIBUTING.md is about running the project locally. I've tried it but am facing errors on the last step

@craeckor
Copy link

craeckor commented Jan 3, 2024

If anyone here has issues with V3, here is my Docker-Compose file.

docker-compose.yml


version: "3.8"

services:
  postgres:
    image: postgres:alpine
    restart: always
    ports:
      - 5432:5432
    volumes:
      - ./pgdata:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      start_period: 15s
      interval: 30s
      timeout: 30s
      retries: 3
    environment:
      - POSTGRES_DB=postgres
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=secure_password

  server:
    image: amruthpillai/reactive-resume:server-3.8.4
    restart: always
    ports:
      - 3100:3100
    volumes:
      - ./assets/exports:/app/server/dist/assets/exports
      - ./assets/uploads:/app/server/dist/assets/uploads
    depends_on:
      - postgres
    environment:
      - PUBLIC_URL=http://localhost:3000
      - PUBLIC_SERVER_URL=http://localhost:3100/api
      - POSTGRES_DB=postgres
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=secure_password
      - SECRET_KEY=secure_key_password
      - POSTGRES_HOST=postgres
      - POSTGRES_PORT=5432
      - JWT_SECRET=secure_jwt_password
      - JWT_EXPIRY_TIME=604800
      - STORAGE_S3_ENABLED=false
      - MAIL_FROM_NAME=Reactive Resume
      - MAIL_FROM_EMAIL=noreply@example.com
      - MAIL_HOST=mail.example.com
      - MAIL_PORT=587
      - MAIL_USERNAME=noreply@example.com
      - MAIL_PASSWORD=secure_mail_password
      - PDF_DELETION_TIME=10800

      
  client:
    image: amruthpillai/reactive-resume:client-3.8.4
    restart: always
    ports:
      - 3000:3000
    depends_on:
      - server
    environment:
      - PUBLIC_URL=http://localhost:3000
      - PUBLIC_SERVER_URL=http://localhost:3100/api
      
volumes:
  pgdata:
  exports:
  uploads:

@TheUmbrella99
Copy link

TheUmbrella99 commented Jan 20, 2024

First paragraph in the README states;

The platform is extremely user-friendly and can be self-hosted in less than 30 seconds if you wish to own your data completely.

Yet it actually seems that the ability to local host has been deliberately obfuscated with removal of docs, and users in the open issue discuss sharing their own methods of getting it running.

Not sure what's going on, but by having the above quote in the README it's wasting peoples time searching docs looking for this mythical "30 seconds to self host".

Encourage self hosting or don't; but misleading people like this is frankly annoying.

@justpankajdotcom justpankajdotcom changed the title [Bug] Link for documentation to for local deployment? [Bug] Link for documentation for local deployment? Jan 20, 2024
@delize
Copy link

delize commented Jan 27, 2024

So after spending more than 30 minutes setting this up I have it functioning - except for the image upload. Then I found this issue.

@ToshY - I am using something very similar - using nginx instead of traefik. However, I can't seem to get the storage urls to work properly, and actually display images after upload. I see the photos getting uploaded into the minio storage bucket, but, I always see access denied errors from the minio side.

This occurs using either a accessible domain, or the private docker URLs.

Any idea or does your setup work with image upload?

@ToshY
Copy link

ToshY commented Jan 27, 2024

Hey @delize 👋

I've tested my own setup in development and production both with external S3 storage (instead of Minio). Yes, image upload/display still works fine.

Without knowing you're docker compose config / setup I can only guess what you're problem might be, but if you're saying that it's saved correctly in Minio, but not being displayed in Reactive Resume itself, it could be an issue with an incorrect STORAGE_URL.

@JKamsker JKamsker linked a pull request Apr 2, 2024 that will close this issue
@AashishSinghal
Copy link

this file has a basic guide for local running
/Reactive-Resume/CONTRIBUTING.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Issues that need to be triaged v4 Issues related to the latest version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants