Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
haskell-gargantext
haskell-gargantext
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 175
    • Issues 175
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 9
    • Merge Requests 9
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • gargantext
  • haskell-gargantexthaskell-gargantext
  • Issues
  • #358

Closed
Open
Opened Jun 17, 2024 by Przemyslaw Kaminski@cgenie
  • Report abuse
  • New issue
Report abuse New issue

Proxy static files for dev/prod servers

Currently, if I understood this correctly, there is a main nginx server for dev/prod etc which proxies requests to dev/prod backend API servers. This has one major drawback: the static files are served by the haskell backend API which loads our API unnecessarily. We should add another proxy (nginx or caddy) in dev/prod servers so that they serve static files and proxy other requests to the API.

So instead of:

nginx -> dev API

we would have:

nginx -> nginx on dev -> dev API

and nginx on dev will serve static files from dev.

If we were to use caddy on dev machines, the Caddyfile is quite simple:

http://localhost:8108 {
        reverse_proxy /api/* localhost:8008
        reverse_proxy /gql/* localhost:8008

	root * /srv/purescript-gargantext/dist
	file_server
}

(no that the 'http' part means caddy will not ask for letsencrypt certs -- we don't need that here as it's for internal routing).

If we were to merge #341 , we would also have to add websockets /ws url.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: gargantext/haskell-gargantext#358