Interplanetary Tubby Cat memes
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
lza_menace eea72168db dont show meta 2 years ago
alembic update db models, simplify things 2 years ago
conf rename file 2 years ago
tubbymemes dont show meta 2 years ago
.gitignore getting some chain syncing going, still very rough 2 years ago
LICENSE Initial commit 2 years ago
Makefile remove references to avax 2 years ago
README.md remove references to avax 2 years ago
alembic.ini adding alembic to project 2 years ago
env-example remove more avax from configs/env-example 2 years ago
manage.sh reskinning for tubbycats 2 years ago
requirements.txt wire up metamask authentication 2 years ago

README.md

tubbymemes

Meme site dedicated to the best project on the Etherium network ;)

https://tubbycats.xyz/about

Setup

Tools you will need:

Development

I have provided a Makefile with some helpful stuff...make sure to install make to use it.

# install python virtual environment and install application dependencies
make setup

# setup secrets
cp env-example .env && vim .env

# install ipfs
sudo make install-ipfs

# run ipfs
make run-ipfs

# initialize sqlite database w/ schema via alembic
make init

# run development server
make dev

# access at http://127.0.0.1:5000

Production

You need a few more things:

  • A VPS with a decent provider
  • Nginx
  • Certbot / Letsencrypt

Below is a set of commands you can follow to get setup. I used Ubuntu 20.04 on Digital Ocean. Run the below commands as root or prepend sudo.

# install nginx
apt-get install nginx -y

# install certbot
apt-get install certbot -y

# point DNS records at your VPS w/ a domain you control

# generate diffie hellman keys
openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048

# setup nginx ssl config from this repo
cp conf/nginx-ssl.conf /etc/nginx/conf.d/ssl.conf

# setup nginx site config from this repo
cp conf/nginx-site.conf /etc/nginx/sites-enabled/tubbymemes.conf

# generate TLS certificates
service nginx stop
certbot certonly --standalone -d <your dns record> --agree-tos -m <your email> -n
service nginx start

# setup ipfs service account and storage location
useradd -m ipfs
mkdir -p /opt/ipfs
chown ipfs:ipfs /opt/ipfs

# setup ipfs service daemon
cp conf/ipfs.service /etc/systemd/system/ipfs.service
systemctl daemon-reload
systemctl enable ipfs
systemctl start ipfs

# setup tubbymemes service account and storage location
useradd -m tubbymemes
mkdir -p /opt/tubbymemes

# setup tubbymemes application
git clone https://github.com/lalanza808/tubbymemes /opt/tubbymemes
cp /opt/tubbymemes/env-example /opt/tubbymemes/.env
vim /opt/tubbymemes/.env
chown -R tubbymemes:tubbymemes /opt/tubbymemes

# setup tubbymemes service daemon
cp conf/tubbymemes.service /etc/systemd/system/tubbymemes.service
systemctl daemon-reload
systemctl enable tubbymemes
systemctl start tubbymemes

# setup ongoing syncing with remote servers and Avalanche network
crontab -u tubbymemes conf/crontab

At this point you should have Nginx web server running with TLS certificates generated with Letsencrypt/Certbot, Systemd services for IPFS daemon for serving files and Gunicorn for serving the Flask application.

You'll obviously need to update some of your configuration files to match your domain/DNS, but it's fairly trivial.

Reach out on Twitter or Discord if you need support.