Skip to content

Instantly share code, notes, and snippets.

View qweliant's full-sized avatar
🧟
A zombie, philosophically speaking

Qwelian D Tanner qweliant

🧟
A zombie, philosophically speaking
View GitHub Profile
version: "3.4"
services:
go:
build:
context: .
dockerfile: ./go/Dockerfile
ports: ["8000:8000"]
env_file:
- .env
FROM golang:1.12 AS build
WORKDIR /opt/src
COPY . .
WORKDIR /opt/src/go
RUN go get -d -v ./...
RUN go build -o quickstart
FROM gcr.io/distroless/base-debian10
version: "3.4"
x-environment: &QUICKSTART_ENVIRONMENT
# These are read from .env file. The values in the .env file maybe overriden by shell envvars
PLAID_CLIENT_ID: ${PLAID_CLIENT_ID}
PLAID_SECRET: ${PLAID_SECRET}
PLAID_PRODUCTS: ${PLAID_PRODUCTS}
PLAID_COUNTRY_CODES: ${PLAID_COUNTRY_CODES}
PLAID_REDIRECT_URI: ${PLAID_REDIRECT_URI}
PLAID_ENV: ${PLAID_ENV}
services:
{
"accounts": [
{
"account_id": "BxBXxLj1m4HMXBm9WZZmCWVbPjX16EHwv99vp",
"balances": {
"available": 100,
"current": 110,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
version: "3"
services:
neo4j:
container_name: neo4j
image: neo4j:latest
volumes:
- ./neo4j/data:/data
- ./neo4j/logs:/logs
- ./neo4j/import:/var/lib/neo4j/import
- ./neo4j/plugins:/plugins
@qweliant
qweliant / Dockerfile
Last active January 20, 2021 06:04
Dockerfile example using Go and neo4j
ARG GO_VERSION=1.15.3
ARG ALPINE_VERSION=latest
FROM golang:${GO_VERSION}-alpine AS builder
ARG SEABOLT_VERSION=v1.7.4
RUN apk add --update --no-cache ca-certificates cmake make g++ openssl-dev openssl-libs-static git curl pkgconfig libcap
RUN git clone -b ${SEABOLT_VERSION} https://github.com/neo4j-drivers/seabolt.git /seabolt
RUN update-ca-certificates 2>/dev/null || true
@qweliant
qweliant / res.json
Created January 8, 2021 04:02
Example response from plaid balance endpoint
{
"accounts": [
{
"account_id": "BxBXxLj1m4HMXBm9WZZmCWVbPjX16EHwv99vp",
"balances": {
"available": 100,
"current": 110,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
@qweliant
qweliant / docker-compose.yml
Last active September 1, 2020 19:35
yml for docker compose
version: '3'
services:
chatsume:
build: .
container_name: "chsme"
ports:
- "8000:8080"
volumes:
- ./app/:/app
@qweliant
qweliant / Dockerfile
Last active September 1, 2020 19:34
docker container for deployment
FROM python:3.7
COPY ./requirements/requirements.txt ./requirements/requirements.txt
RUN pip3 install -r requirements/requirements.txt
COPY ./app /app
RUN useradd -m myuser
USER myuser
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8080"]
@qweliant
qweliant / main.py
Last active September 1, 2020 18:00
FastAPI for serving NLP model
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from pydantic import BaseModel
from app.nlp import NLP
class Message(BaseModel):
input: str
output: str = None
app = FastAPI()