Skip to content

Instantly share code, notes, and snippets.

View arturataide's full-sized avatar
🚀

Artur Ataíde arturataide

🚀
View GitHub Profile
@arturataide
arturataide / Dockerfile
Created September 1, 2020 23:12
Dockerfile content
FROM python:3.8-slim-buster
RUN apt-get clean && \
apt-get update && \
apt-get install -y nginx smbclient default-libmysqlclient-dev \
gcc python3-cffi libcairo2 libpango-1.0-0 libpangocairo-1.0-0 \
libgdk-pixbuf2.0-0 libffi-dev shared-mime-info
# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
# Names of nodes to start
CELERYD_NODES="WORKER_1 WORKER_2 WORKER_3 WORKER_4"
# Absolute or relative path to the 'celery' command:
CELERY_BIN="/usr/local/bin/celery"
# App instance to use
CELERY_APP="api"
# Where to chdir at start.
@arturataide
arturataide / celeryd.sh
Created September 1, 2020 22:42
CeleryD Daemon
#!/bin/sh -e
# ============================================
# celeryd - Starts the Celery worker daemon.
# ============================================
#
# :Usage: /etc/init.d/celeryd {start|stop|force-reload|restart|try-restart|status}
# :Configuration file: /etc/default/celeryd
#
# See http://docs.celeryproject.org/en/latest/userguide/daemonizing.html
@arturataide
arturataide / nginx.conf
Created September 1, 2020 21:56
Nginx configuration
server {
listen 80;
server_name YOUR_SERVER_NAME;
charset utf-8;
client_max_body_size 75M;
location /static/ {
alias /PROJECT_FOLDER/static/;
}
@arturataide
arturataide / uwsgi.ini
Created September 1, 2020 21:32
uWSGI configuration file
[uwsgi]
base = /PROJECT_FOLDER
chdir = %(base)
home = %(base)
pidfile= %(base)/myproject.pid
pythonpath= /usr/local
uid = www-data
gid = www-data
module = api.wsgi:application # path to wsgy.py file
socket = :8000