Before you start, make sure you have Git and Docker installed on your system. Instead of using Docker, you can create your own development environment based on our Dockerfile (not recommended). You'll need Go >= 1.11, TensorFlow for C, Make, NPM and MySQL. Without Docker, test results will be less reliable and you also won't be able to use our other Dockerfiles (e.g. for TensorFlow).
Step 1: Run Git to clone this project:
git clone email@example.com:photoprism/photoprism.git
Step 2: Start Docker containers:
cd photoprism docker-compose up
Note: This docker-compose configuration is for testing and development purposes only.
Step 3: Open a terminal to the photoprism container:
docker-compose exec photoprism bash
Now - inside this terminal - you can run tests and commands:
make all make test ./photoprism start
You can see a list of all
make targets in our Makefile. For example,
make install will build a
photoprism production binary without debug information and install it in the user's directory including all assets.
- Radomir Sohlich wrote a pragmatic introduction to Makefiles for Go developers.
- We are using Go Modules for managing our dependencies (new in 1.11).
- If you never used Go before and would like to learn it, you are welcome to reach out. We might start organizing regular learning sessions for beginners in Berlin.
- This guide was not tested on Windows, you might need to change docker-compose.yml to make it work with Windows specific paths.
Alternate Development Environment's¶
The following are setup instructions for development and testing and should be avoided unless docker is either not supported or not allowed in your environment: