Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

accent-starlette/starlette-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Base images for starlette.

For use in conjunction with https://github.com/accent-starlette/boilerplate.

Example Dockerfile:

ARG         EXTRA_DEPS
ARG         EXTRA_BUILD_DEPS
ARG         REQUIREMENTS_FILE=/requirements/base.txt

FROM        accent/starlette-docker:3.8-alpine

ENV         APP_MODULE=app.main:app \
            ALLOWED_HOSTS="*" \
            DATABASE_URL=postgresql+psycopg2://postgres:password@db:5432/appdb \
            SECRET_KEY="***** change me *****" \
            EMAIL_HOST=mail \
            EMAIL_PORT=1025 \
            [email protected] \
            EMAIL_DEFAULT_FROM_NAME=Mail

Example docker-compose.yml:

version: '2'

services:
  app:
    build:
      context: .
      args:
      - REQUIREMENTS_FILE=/requirements/dev.txt
    environment:
    - DATABASE_URL=postgresql+psycopg2://postgres:password@db:5432/appdb
    - DEBUG=True
    volumes:
    - ./src:/app
    depends_on:
    - db
    ports:
    - "80:80"
    command: ['/start-reload.sh']
  db:
    image: postgres:9.6
    environment:
    - POSTGRES_USER=postgres
    - POSTGRES_PASSWORD=password
    - POSTGRES_DB=appdb
    - PGDATA=/var/lib/postgresql/data/pgdata
    volumes:
    - ./.postgres:/var/lib/postgresql/data/pgdata
    ports:
    - "5432:5432"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published