Gay Catgirls' fork of Moa. Link your Mastodon, Pleroma, or Akkoma account to Twitter!
Find a file
Evie Viau c79dcd97ec
Add link to instance statistics in footer
Signed-off-by: Evie Viau <evie@eviee.gay>
2023-01-16 01:26:10 -08:00
.idea fixes #132 2020-05-03 17:25:59 -07:00
logs ignores 2019-04-16 10:29:00 -07:00
migrations add option to remove toot content warning for #121 2020-05-03 16:15:42 -07:00
moa Genericize Mastodon terminology & rebrand frontend 2023-01-16 00:13:54 -08:00
public ignores 2019-04-16 10:29:00 -07:00
static Rewrote home page more drastically, removed the made with pycharm graphic, commented out connect to Instagram 2021-03-23 21:56:20 -07:00
templates Add link to instance statistics in footer 2023-01-16 01:26:10 -08:00
tests Revert "drop twitter handle suffix for #115" 2023-01-15 20:15:11 -08:00
tmp ignores 2019-04-16 10:29:00 -07:00
tools add option to remove toot content warning for #121 2020-05-03 16:15:42 -07:00
.coveragerc add coverage config 2017-11-27 18:19:38 -08:00
.gitignore Merge branch 'master' of https://gitlab.com/fedstoa/moa 2021-05-13 19:13:09 +02:00
.python-version handle a bunch of new exceptions 2019-08-04 13:02:59 -07:00
app.py Fix some issues that cause incompatibility with postgres 2023-01-15 20:14:58 -08:00
config.py.sample some doc fixups 2018-09-08 10:14:20 -07:00
defaults.py Fix defaults.py, set reasonable default values again. 2022-11-07 23:22:58 +01:00
docker-compose.yml Use MARIADB vars in docker-compose.yml 2023-01-16 01:24:34 -08:00
docker-config.py.sample Enable sending posts/tweets in the sample Docker 2023-01-15 23:39:26 -08:00
Dockerfile Use Gunicorn for the container 2023-01-16 01:09:33 -08:00
LICENSE Create LICENSE 2017-10-31 20:14:35 -07:00
passenger_wsgi.py simplify passenger file 2017-11-10 16:08:57 -08:00
Pipfile Update requirements and make defaults a bit more self-doc 2021-03-14 21:13:33 +01:00
README.md Add running via containers instructions 2023-01-16 01:25:13 -08:00
requirements-dev.in convert to pyenv 2020-05-03 14:08:55 -07:00
requirements.in newer requirements 2020-05-03 14:29:58 -07:00
requirements.txt Use Gunicorn for the container 2023-01-16 01:09:33 -08:00
run-dev.sh MOA_CONFIG takes object in config.py everywhere. 2021-05-13 19:27:53 +02:00
run.sh Use Gunicorn for the container 2023-01-16 01:09:33 -08:00
worker.sh Use Gunicorn for the container 2023-01-16 01:09:33 -08:00

   _____                _____      _        _      _       __  __
  / ____|              / ____|    | |      (_)    | |     |  \/  |
 | |  __  __ _ _   _  | |     __ _| |_ __ _ _ _ __| |___  | \  / | ___   __ _
 | | |_ |/ _` | | | | | |    / _` | __/ _` | | '__| / __| | |\/| |/ _ \ / _` |
 | |__| | (_| | |_| | | |___| (_| | || (_| | | |  | \__ \ | |  | | (_) | (_| |
  \_____|\__,_|\__, |  \_____\__,_|\__\__, |_|_|  |_|___/ |_|  |_|\___/ \__,_|
                __/ |                  __/ |
               |___/                  |___/

┌──────────────┐     ╔══════════════════════╗      ┌──────────────┐
│  Instagram   │────▶║  moa.gaycatgirl.sex  ║◀────▶│   Twitter    │
└──────────────┘     ╚══════════════════════╝      └──────────────┘
                                ▲
                                │
                                ▼
                        ┌───────────────┐
                        │   Fediverse   │
                        └───────────────┘

Link your Mastodon, Pleroma, or Akkoma account to Twitter and Instagram! https://moa.gaycatgirl.sex

Thank you to James Moore as the original creator and to the FedStoa group for being the maintainers of both the original code and the original public service.

You can follow us on the Fediverse to receive updates and service notices.

Install & Run

Using containers

This works for either Docker or Podman, https://moa.gaycatgirl.sex uses Podman and podman-compose in prod.

  • Ensure you have either Docker or Podman installed, and the appropriate compose utility installed
  • Clone the repo
  • Copy the sample docker config cp docker-config.py config.py and modify the fields appropriately
  • Pull the image down (or don't if you want it to automatically build from source) with {podman|docker} pull git.gaycatgirl.sex/gaycatgirls/moa:latest
  • Run {podman|docker}-compose up -d to download and start the containers
  • (TODO: this is? awful, figure out a better solution!) Exec into the web container to run the database migrations {podman|docker}-compose exec web bash and then MOA_CONFIG=ProductionConfig python -m moa.models
  • Restart the containers using {podman|docker}-compose restart
  • It should now be up!

From Source (Requires Python 3.6+)

Moa is a flask app and can be run with python or proxied via WSGI.

  • Clone the repo
  • On Debian/Ubuntu you'll need to apt install python-dev python3-dev build-essential
  • Install pipenv pip3 install pipenv
  • PIPENV_VENV_IN_PROJECT=1 pipenv install
  • cp config.py.sample config.py and override the settings from defaults.py
  • MOA_CONFIG=config.DevelopmentConfig /usr/local/bin/pipenv run python -m moa.models to create the DB tables
  • MOA_CONFIG=config.DevelopmentConfig /usr/local/bin/pipenv run python app.py
  • Run the worker with MOA_CONFIG=DevelopmentConfig /usr/local/bin/pipenv run python -m moa.worker or use your favourite WSGI server.

Features

  • preserves image alt text
  • handles boosts/retweets

Some code lifted from https://github.com/halcy/MastodonToTwitter

Twitter App setup

If you plan to use twitter then you'll need to create a twitter app first so the required crednetials can be obtained.

Example nginx/passenger configuration

server {
    listen 80;
    server_name moa.party;
    return 301 https://$server_name$request_uri;
}

server {
    listen 443 ;
    server_name moa.party;
    
    # SSL
    
    ssl on;
    ssl_certificate     /etc/certificates/moa.crt;
    ssl_certificate_key /etc/certificates/moa.key;
    
    client_max_body_size 1G;
    
    access_log /var/www/moa/logs/access.log;
    error_log /var/www/moa/logs/error.log;
    
    location = /favicon.ico { log_not_found off; access_log off; }
    location = /robots.txt  { log_not_found off; access_log off; }
    
    passenger_enabled on;
    passenger_app_env production;
    passenger_python /var/www/moa/.venv/bin/python3;
    passenger_env_var MOA_CONFIG config.ProductionConfig;
    
    root /var/www/moa/public;
}