mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-28 00:46:45 +01:00
89ed4ce864
* Fix docker dev environment - Use postgres 12 to fix a failing test - Leverage a yaml anchor to share worker/web services configuration - Add psql - Configure psql * Don't use :cached * Use Postgres 12 in docker-compose everywhere * Use postgresql-client-12 * Remove extraneous whitespace * Clean up dev.Dockerfile * Clean up EE dev/test docker-compose * Simplify docker-compose.ch.test.yml Co-authored-by: Michael Matloka <dev@twixes.com>
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
version: '3'
|
|
|
|
services:
|
|
db:
|
|
image: postgres:12-alpine
|
|
container_name: posthog_db
|
|
environment:
|
|
POSTGRES_USER: posthog
|
|
POSTGRES_DB: posthog
|
|
POSTGRES_PASSWORD: posthog
|
|
ports:
|
|
- '5432:5432'
|
|
redis:
|
|
image: 'redis:5-alpine'
|
|
container_name: posthog_redis
|
|
ports:
|
|
- '6379:6379'
|
|
worker: &worker
|
|
build:
|
|
context: .
|
|
dockerfile: dev.Dockerfile
|
|
command: ./bin/docker-worker
|
|
volumes:
|
|
- .:/code
|
|
environment:
|
|
DATABASE_URL: 'postgres://posthog:posthog@db:5432/posthog'
|
|
REDIS_URL: 'redis://redis:6379/'
|
|
SECRET_KEY: '<randomly generated secret key>'
|
|
DEBUG: 'true'
|
|
PGHOST: db
|
|
PGUSER: posthog
|
|
PGPASSWORD: posthog
|
|
depends_on:
|
|
- db
|
|
- redis
|
|
links:
|
|
- db:db
|
|
- redis:redis
|
|
web:
|
|
<<: *worker
|
|
command: ./bin/docker-dev-web
|
|
ports:
|
|
- '8000:8000'
|
|
- '8234:8234'
|