Skip to content

tnibert/Camelot

Repository files navigation

Camelot

This is a nice little photo sharing web application to manage photos and share with friends and family. I've open sourced it and would like to give it a bit of love and uplift.

High level project goals:

  • Implement some form of server federation
  • Promote security, privacy, and user sovereignty of data
  • Promote a positive and wholesome photo sharing experience
  • Interoperate with bigger fish

Run

Create .env

In order to run the application, you need a .env file in the project root directory defining the following environment variables:

  • SECRET_KEY
  • GOOGLE_RECAPTCHA_SECRET_KEY
  • GOOGLE_RECAPTCHA_PUBLIC_KEY
  • SITE_DOMAIN
  • DEPLOYMENT - one of either linux or aws
    • If set to aws must define environment variable:
      • BUCKET - the S3 bucket to store photos in
  • REGISTRATION_MODE - one of code, email, disabled, for registration via shared code, email confirmation, or disabled registration respectively.
    • If set to code must define environment variable:
      • INVITE_CODE - the registration code required to register

Run Locally Using Docker Compose (Recommended)

$ make build

Run Locally, Not In Docker Container

$ python -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt --only-binary Pillow --only-binary psycopg2-binary
$ python manage.py migrate
$ python manage.py runserver 0:8000

Run Unit Tests

From Docker Compose

$ make test

Deploy

AWS Deployment

Note that AWS support is not quite production ready.

In order to deploy onto AWS, you need a .env_aws file in the project root directory defining variables:

  • REGION - the region to deploy the application in
  • AWSID - the AWS user ID which will be deploying the application

There is another repository, camelot-infrastructure (https://github.com/tnibert/camelot-infrastructure) which contains Terraform code to deploy on AWS. From that repository root, run:

$ terraform init
$ terraform apply

Then from this repository root, run:

$ make deploy-image-aws

You may need to run aws configure first to provide your credentials, if you haven't already.

Debian Deployment

This method is no longer actively supported. Your mileage may vary.

You will need to provide the correct DATABASE_URL in your .env.
Create file deploy-debian/.env-debian as described in deploy-debian/README.

Then:

$ cd deploy-debian
$ ./deploydebian.sh
$ ./sslcertsetup.sh

API

The application can be interacted with via an API.
This functionality is exercised by the script at https://github.com/tnibert/project-camelot-cli.

About

image sharing web platform built on django

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Contributors