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 python:3.8.12-slim-buster | |
RUN apt update && apt install -y cron vim | |
RUN mkdir /code | |
ARG DB_HOST | |
ARG DB_NAME | |
ARG DB_USER | |
ARG DB_PASS | |
ARG CRON_SCHEDULE |
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 python:3.6.5-slim AS sobase | |
RUN apt-get clean && apt-get -y update | |
RUN apt-get -y install python3-dev build-essential | |
RUN apt-get -y install libssl-dev | |
RUN mkdir /code | |
COPY requirements.txt /code | |
RUN CFLAGS="-I/usr/local/opt/openssl/include" \ |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no" /> | |
<title>Socket.io</title> | |
<style> | |
body { | |
padding: 0; | |
margin: 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
import logging | |
import socketio | |
from engineio.async_drivers import gevent | |
logging.basicConfig(level=logging.INFO) | |
sio = socketio.Server(async_mode="gevent_uwsgi", cors_allowed_origins='*', engineio_logger=True) | |
logger = logging.getLogger("socket-server") | |
@sio.on('connect', namespace='/') |
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
sudo apt install git python3 python3-dev vim htop jq automake build-essential | |
# Docker | |
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable" | |
sudo apt-get update | |
sudo apt install docker-ce | |
docker --version |
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
# Install docker Ubuntu 16.04 | |
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable" | |
sudo apt-get update | |
apt-cache search docker-ce | |
sudo apt-get install -y docker-ce |
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 debian:jessie-slim | |
RUN apt-get update && \ | |
apt-get install -y ca-certificates && \ | |
rm -rf /var/lib/apt/lists/* | |
RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 0C49F3730359A14518585931BC711F9BA15703C6 && \ | |
gpg --export $GPG_KEYS > /etc/apt/trusted.gpg.d/mongodb.gpg | |
ARG MONGO_PACKAGE=mongodb-org |
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
{ | |
"settings": { | |
"index": { | |
"creation_date": "1556813167970", | |
"number_of_shards": "1", | |
"number_of_replicas": "1", | |
"uuid": "Q7778WcLRHmpX9061AH5fg", | |
"version": { | |
"created": "7000099" | |
}, |
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 selenium import webdriver | |
from scrapy.http import HtmlResponse | |
from selenium.webdriver.chrome.options import Options | |
""" | |
whatch chromedriver version supporting the chrome browser version in system | |
""" | |
class SeleniumMiddleware(object): | |
def process_request(self,request,spider): |
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
docker rm `docker ps --no-trunc -aq` |
NewerOlder