This guide uses the domain your-domain.tld and its www. prefixed version.
It starts the rocket application on 127.0.0.1:1337 and as the user www-data. The proxy listens on port 80 and 443 though.
If you need other values, update them accordingly in your nginx and systemd configs.
This file contains hidden or 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 sqlalchemy import event | |
| from sqlalchemy.orm import sessionmaker | |
| from app.db.session import engine | |
| import pytest | |
| import app.tests.config | |
| @pytest.fixture( | |
| scope='function', | |
| autouse=True # New test DB session for each test, todo we need it only for tests with Client fixture |
This file contains hidden or 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/python3 | |
| """ Python CLI script "stand alone" - MySQL Migration | |
| Need python-dotenv & mysql-connector-python | |
| Command : python console.py migrate | |
| """ | |
| import os | |
| from argparse import ArgumentParser |
This file contains hidden or 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 | |
| var gulp = require('gulp'); | |
| var gutil = require('gulp-util'); | |
| var notify = require('gulp-notify'); | |
| var less = require('gulp-less'); | |
| var concat = require('gulp-concat'); | |
| var sourcemaps = require('gulp-sourcemaps'); | |
| var cleanCSS = require('gulp-clean-css'); | |
| var LessPluginAutoPrefix = require('less-plugin-autoprefix'); |
This file contains hidden or 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
| # Console | |
| alias sf="php app/console" | |
| alias sfdev="php app/console --env=dev" | |
| alias sfprod="php app/console --env=prod" | |
| # Helper | |
| alias sf:cc="php app/console cache:clear" | |
| alias sf:gb="php app/console generate:bundle" | |
| alias sf:rd="php app/console router:debug" | |
| alias sf:dsd="php app/console doctrine:schema:update" |
This file contains hidden or 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
| server { | |
| listen 80; | |
| # Server name being used (exact name, wildcards or regular expression) | |
| server_name SITE.dev www.SITE.dev; | |
| client_max_body_size 20M; | |
| # Document root, make sure this points to your Symfony2 /web directory | |
| root /var/www/SITE/web; |
This file contains hidden or 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
| mg 10800 IN A 000.00.00.000 (Ip mailgun) | |
| email.mg 10800 IN CNAME mailgun.org. | |
| mg 10800 IN TXT "v=spf1 include:mailgun.org ~all" | |
| yolo._domainkey.mg 10800 IN TXT "k=rsa; p=XXX" (domainkey & key mailgun) |
This file contains hidden or 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
| SELECT zip, primary_city, | |
| latitude, longitude, distance | |
| FROM ( | |
| SELECT z.zip, | |
| z.primary_city, | |
| z.latitude, z.longitude, | |
| p.radius, | |
| p.distance_unit | |
| * DEGREES(ACOS(COS(RADIANS(p.latpoint)) | |
| * COS(RADIANS(z.latitude)) |