0

I want developers to use the same development database while developing a Django project so I've created a remote server with Ubuntu 18.04, created Postgres database and allowed remote access.

The problem is that there are missing pictures - media directory is in .gitignore because of production server. How I make media being shared (and editable) so any developer can see any image and assign image to object?

I was thinking about sharing it through git or to store media on production server where Postgres is but not sure how and if it's the best way to do this.

Milano
  • 18,048
  • 37
  • 153
  • 353
  • 1
    Why don't you configure your project to store media files remotely — i.e., in an Amazon S3 instance? That way all of your developers could access them. – Sam Feb 28 '19 at 00:33
  • Sam's suggestion is a good one. Another is to take a step back and ask why you're forcing your developers to all use the same database and `media/` directory. I can't think of a valid reason to impose this on them. – ChrisGPT was on strike Feb 28 '19 at 00:42

1 Answers1

0

Funny setup...

2 thoughts:

  1. Shared DB sure you have your reasons but why are you running a centralized dev server vs having developers run local and gain access to terminal logs with a DATABASE configuration that points to the remote DB?
  2. You can stash an empty media directory or any other -- description on how at How can I add an empty directory to a Git repository?
Alvin
  • 2,533
  • 33
  • 45