### Docker compose setup file # This file can be used to quickly set up a development server # with code auto-reloading and automatic execution of migrations. # ## Note # This file is not intended to be used for production. # The "migrate and server" script will automatically apply migrations # and additionally use the Django development server which is # unsuitable for production. version: "3.6" services: postgres: image: postgres:11-alpine ports: - "127.0.0.1:7777:5432" environment: POSTGRES_DB: pysite POSTGRES_PASSWORD: supersecretpassword POSTGRES_USER: pysite web: build: context: . dockerfile: docker/app/Dockerfile command: docker/app/migrate_and_serve.sh ports: - "127.0.0.1:8000:8000" depends_on: - postgres volumes: - .:/app:ro - staticfiles:/var/www/static environment: DATABASE_URL: postgres://pysite:supersecretpassword@postgres:5432/pysite DEBUG: "true" SECRET_KEY: suitable-for-development-only STATIC_ROOT: /var/www/static volumes: staticfiles: # vim: sw=2 ts=2: