Coder Social home page Coder Social logo

deki / photoprism-aws Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 5.0 52 KB

Templates to simplify and automate a PhotoPrism deployment for photo management on Amazon Web Services (AWS)

License: Apache License 2.0

photos photography cloud cloudformation cloudformation-template cloudformation-templates amazon-web-services aws

photoprism-aws's Introduction

PhotoPrism on AWS

This repo contains a CloudFormation templates to simplify and automate a PhotoPrism deployment for photo management on Amazon Web Services (AWS).

The configuration and parameters are based on the official docker-compose file. Please refer to the PhotoPrism documentation for more information.

Infrastructure diagram

Prerequisites

The template requires an existing VPC with at least two subnets.

Either reuse an existing VPC or follow the steps in the ECS userguide to create one. You can also use the VPC Quick Start.

Deployment

The deployment has been tested in the AWS regions eu-central-1 and us-east-1 but also works in other regions where all services from the diagram above are available.

Go to the AWS CloudFormation Console to start the deployment or use the AWS CLI with a command similar to this one:

aws cloudformation create-stack --stack-name PhotoPrism --template-body file://path/to/directory/photoprism.yaml --capabilities CAPABILITY_NAMED_IAM --parameters ParameterKey=VPC,ParameterValue=vpc-00id00 ParameterKey=Subnet1,ParameterValue=subnet-00id00 ParameterKey=Subnet2,ParameterValue=subnet-00id00 ParameterKey=DatabasePassword,ParameterValue=InsertSecureValueHere ParameterKey=PhotoPrismAdminPassword,ParameterValue=InsertAnotherSecureValueHere

After stack creation is complete look for the output with the key LoadBalancerUrl and open the page in a browser. Login with user admin and the password that you provided as a parameter.

FAQ

Is it ready for production?

The template should be considered as a sample.

How to use HTTPS instead of HTTP?

This requires a certificate. Have a look at the areas that are commented out in the template to add your certificate and setup a Route53 recordset.

Why RDS for MariaDB and not Aurora Serverless or another serverless database like DynamoDB?

PhotoPrism is compatible with MariaDB 10, MySQL 8, and SQLite 3.

Citing from the Advanced part of the PhotoPrism documentation:

Traditional database servers like MariaDB might be slower and less powerful than specialized NoSQL or in-memory engines. They are often better documented and easier to maintain for the majority of users though.

I don't fully agree with that statement, there are NoSQL databases that are well documented. However, it's not possible to simply plugin another database type without changes to the PhotoPrism codebase. Feel free to open a request in the PhotoPrism issue tracker.

Regarding Aurora Serverless: As of now RDS for MariaDB is a cheaper way of running this, but it's possible to change it.

Why is everything put in just two subnets?

It's possible to add a third subnet for another Availability Zone. It's also common to setup separate subnets for e.g. the database. As written above this template should be considered as a simplified sample.

Why EFS and not S3 for image storage?

S3 is currently not supported by PhotoPrism although it seems to be an ideal use case for it, see photoprism/photoprism#93 for more details.

Can I SSH into the container although it's running serverless on Fargate?

Configure a policy with ssmmessages and follow the steps as described in the Amazon ECS documentation.

After you've finished the setup you can SSH into the container using:

aws ecs execute-command --cluster PhotoprismServiceCluster --task 1a2b3cyourtaskid --container PhotoprismService --interactive --command "/bin/sh"

photoprism-aws's People

Contributors

deki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.