Commit 3bdbb4a0 authored by w2v1's avatar w2v1
Browse files

first stab at common mixin

parent 513f045f
Loading
Loading
Loading
Loading
+33 −0
Original line number Diff line number Diff line
version: '3.7'

services:
  flask:
    build:
      context: src/
      dockerfile: api/flask/web/Dockerfile
    ports:
      - '8765:9090'
    #TODO change me
    command: [ "sh", "/tmp/scripts/run_dev.sh" ]
    # command: ["tail", "-f", "/dev/null"]
    environment:
      - FLASK_DEBUG=1
      - CHOKIDAR_USEPOLLING=true
      - FAST_REFRESH=false
      - DATABASE_DB=postgres
      - DATABASE_USER=postgres
      - DATABASE_PW=postgres
      - DATABASE_HOST=db
      - DATABASE_PORT=5432
      - PG_DATABASE=postgres
      - PG_USER=postgres
      - PG_PASSWORD=postgres
      - PG_HOST=postgres
      - PG_PORT=5432
    healthcheck:
      test: [ "CMD", "curl", "--fail", "-G", "http://localhost:9090/api/healthcheck" ]
      interval: 30s
      timeout: 10s
      retries: 30
    volumes:
      - ./src/api/flask/web/:/tmp/api
 No newline at end of file
+9 −0
Original line number Diff line number Diff line
## Common Webserver

This houses the common flask webserver

This flask webserver features a barebones webserver that can be run in a container
or installed with the common package.

It contains some basic features one would need in order to get started with a simple
webserver.
 No newline at end of file
+12 −0
Original line number Diff line number Diff line
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Provide mixins for multiple abstract classes."""

try:
    import redis
except ImportError:
    raise ImportError('You need to pip install redis.')
try:
    import flask
except ImportError:
    raise ImportError('You need to pip install flask.')
+7 −0
Original line number Diff line number Diff line
FROM crunchydata/crunchy-postgres-gis:centos8-13.4-3.1-4.7.2

COPY schema /tmp/schema
COPY static /tmp/static

RUN cp /opt/crunchy/bin/postgres/setup.sql /pgconf/setup.sql
RUN cat /tmp/schema/users.sql >> /pgconf/setup.sql
 No newline at end of file
+26 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading