Skip to content
This repository has been archived by the owner on Nov 2, 2024. It is now read-only.

Pingvin Share - Change data directory #2844

Discussion options

You must be logged in to vote

Finally solved with a PM2 config file.

ecosystem.config.js

const dataDir = "/mnt/media/pingvin"

module.exports = {
  apps : [{
    name: "pingvin-share-backend",
    script: "npm",
    args: "run prod",
    cwd: "/opt/pingvin-share/backend",
    env: {
      DATA_DIRECTORY: dataDir,
    },
  }, {
    name: "pingvin-share-frontend",
    script: "npm",
    args: "run start",
    cwd: "/opt/pingvin-share/frontend",
    env: {
      DATA_DIRECTORY: dataDir,
    },
  }]
}

This approach could also be used to set any of the other variables like PORT or DATABASE_URL.

Don't know enough about bash to make a proper pull request but I think you would remove the two $STD pm2 start ... lines (44 & 48 …

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@ucramos
Comment options

@dhenry437
Comment options

@ucramos
Comment options

@tteck
Comment options

Answer selected by dhenry437
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants