This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"schemaVersion": 2, | |
"dockerfilePath": "Dockerfile" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM tiangolo/meinheld-gunicorn:python3.7-alpine3.8 | |
RUN mkdir -p /app | |
RUN mkdir -p /usr/src/static | |
RUN mkdir -p /usr/src/data | |
WORKDIR /app | |
COPY ./ /app | |
RUN pip install -r requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
# Run collect static and migrations | |
python manage.py collectstatic --noinput | |
python manage.py migrate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"captainVersion": "2", | |
"documentation": "Taken from https://github.com/thomascenni/djcap", | |
"displayName": "DjCap", | |
"description": "Deploy a Django application with Caprover PaaS.", | |
"dockerCompose": { | |
"version": "2", | |
"services": { | |
"$$cap_appname": { | |
"image": "alpine:3.8", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from io import BytesIO | |
from django.http import HttpResponse | |
# suppose to have a Dataframe object | |
# inside a Django view | |
df = pd.DataFrame(...) | |
with BytesIO() as b: | |
# Use the StringIO object as the filehandle. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
php -v | |
curl -LO https://cecil.app/cecil.phar | |
chmod +x cecil.phar | |
./cecil.phar -V | |
./cecil.phar new:site mywebsite | |
cd mywebsite | |
# add a blog page | |
../cecil.phar new:page blog/my-first-post.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"require": { | |
"mpdf/mpdf": "^8.0" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
captainVersion: 4 | |
services: | |
$$cap_appname-mail: | |
image: bytemark/smtp | |
restart: always | |
environment: | |
RELAY_HOST: $$cap_RELAY_HOST | |
RELAY_PORT: $$cap_RELAY_PORT | |
RELAY_USERNAME: $$cap_RELAY_USERNAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
captainVersion: 4 | |
services: | |
$$cap_appname-db: | |
image: mysql:5.7.32 | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: $$cap_db_root_password | |
MYSQL_DATABASE: ninja | |
MYSQL_USER: invoiceninja |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Statement": [{ | |
"Action": ["s3:GetBucketLocation", "s3:ListBucket"], | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": ["*"] | |
}, | |
"Resource": ["arn:aws:s3:::job-offers"] | |
}, { | |
"Action": ["s3:GetObject"], |
OlderNewer