Navigation Menu

Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Difficulty to run it without Docker #6601

Closed
mirabellette opened this issue Sep 30, 2018 · 2 comments
Closed

Difficulty to run it without Docker #6601

mirabellette opened this issue Sep 30, 2018 · 2 comments
Labels

Comments

@mirabellette
Copy link

Hello everyone,

In order to manage by my own the Firefox Authentication, I am installing the four micro services required to do it.:

  • fxa-auth-db-mysql -> authdb.example.com
  • fxa-auth-server -> auth.example.com
  • fxa-content-server -> content.example.com
  • fxa-oauth-server -> oauth.example.com
  • fxa-profile-server -> profile.example.com

Moreover, I do not want to use Docker because I really want to understand how it works. I was able to configure most of them except fxa-content-server.

This is the process I followed:

  • git clone https://github.com/mozilla/fxa-content-server.git
  • chown firefox:firefox -R fxa-content-server
  • cd /opt/fxa-content-server
  • sudo -u firefox npm install --production
  • sudo -u firefox npm install bluebird
  • sudo -u firefox npm run build-production
  • sudo -u firefox NODE_ENV=production npm start

However, I got two errors I was not able to solve when I connect to content.example.com.

The first one is about static css. Even if I specificy in server/config/production.json to load "static_directory": "dist" and "page_template_subdirectory": "dist" ; it is loaded from app directory.
That means some css and bundle.js is missing. How to fix that?

The second error I got is about geodb, I do not understand why but I got no fetch data. I replaced

  • "public_url":
  • "oauth_url":
  • "profile_url":
  • "profile_images_url": "I let the original one for this one"

Do you have some idea about that?

Thank you for your help,
Best regards,
Mirabellette

@shane-tomlinson
Copy link

shane-tomlinson commented Oct 1, 2018

Hi @mirabellette, in the last step where you do NODE_ENV=production npm start, try running npm run start-production. The start-production script points to the correct config files to load the JS & CSS from dist.

The geodb error happens often if you are connecting to a local server or from a private IP address, e.g., localhost, 127.0.0.1, 192.168.., etc. Since those are private IP addresses the DB won't have geo information about them.

@vladikoff
Copy link
Contributor

NODE_ENV=production npm start 👍

@ghost ghost removed the waffle:backlog label Oct 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants