0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-22 08:40:03 +01:00
posthog/docker-compose.dev.yml
Tim Glaser bcf427cb55
Webpack HMR, Add hashes to chunk filenames. (#878)
* Closes #877 chunk loading errors

* Closes #877 chunk loading errors

* add chunks to all webpack files, use webpack-html-plugin to make an index.html with the right names

* change to contenthash for better caching

* add dev server on a different port

* store loaded scenes in reducer

* add react-hot-loader

* add react-hot-loader to all code split points

* fix action pages HMR

* ignore cypress screenshots

* generate django login/signup page layout with webpack html plugin

* move to devDependencies

* expose webpack-dev-server ports

* run tests on the production docker image

* start webpack dev server on a custom host if requested

* revert e2e to dev dockerfile

* add test travis config

* add stages

* add travis conf

* cache node and pip

* node 11

* travis ci bump

* node via nvm

* install v12, disable cypress for a moment

* remove 2 commands, test cached build time

* try different yarn cache, add cypress

* add postgres 12

* migrate before cypress

* remove latest postgres for now

* createdb before cypress

* Try different port

* cull packages

* remove hash from main bundle filenames to not break anything

* cypress port 8000

* cypress tests with production docker

* don't use the /code path in e2e test, use docker image

* remove hash from css to work better with editor

* only one export from actions

* remove travis test

Co-authored-by: Marius Andra <marius.andra@gmail.com>
2020-06-02 10:39:53 +01:00

59 lines
1.2 KiB
YAML

version: '3'
services:
db:
image: postgres:alpine
container_name: posthog_db
environment:
POSTGRES_USER: posthog
POSTGRES_DB: posthog
POSTGRES_PASSWORD: posthog
ports:
- "5439:5432"
redis:
image: "redis:alpine"
container_name: posthog_redis
ports:
- "6379:6379"
web:
build:
context: .
dockerfile: dev.Dockerfile
command: ./bin/docker-dev-web
volumes:
- .:/code
ports:
- "8000:8000"
- "8234:8234"
environment:
IS_DOCKER: "true"
DATABASE_URL: "postgres://posthog:posthog@db:5432/posthog"
REDIS_URL: "redis://redis:6379/"
SECRET_KEY: "<randomly generated secret key>"
DEBUG: "true"
depends_on:
- db
- redis
links:
- db:db
- redis:redis
worker:
build:
context: .
dockerfile: dev.Dockerfile
command: ./bin/docker-worker
volumes:
- .:/code
environment:
IS_DOCKER: "true"
DATABASE_URL: "postgres://posthog:posthog@db:5432/posthog"
REDIS_URL: "redis://redis:6379/"
SECRET_KEY: "<randomly generated secret key>"
DEBUG: "true"
depends_on:
- db
- redis
links:
- db:db
- redis:redis