2020-04-22 12:12:37 +02:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
2020-08-18 11:08:40 +02:00
|
|
|
db:
|
2021-04-03 20:41:47 +02:00
|
|
|
image: postgres:12-alpine
|
2020-08-18 11:08:40 +02:00
|
|
|
container_name: posthog_db
|
|
|
|
environment:
|
|
|
|
POSTGRES_USER: posthog
|
|
|
|
POSTGRES_DB: posthog
|
|
|
|
POSTGRES_PASSWORD: posthog
|
|
|
|
ports:
|
2021-03-16 17:06:18 +01:00
|
|
|
- '5432:5432'
|
2020-08-18 11:08:40 +02:00
|
|
|
redis:
|
2020-10-16 09:47:47 +02:00
|
|
|
image: 'redis:5-alpine'
|
2020-08-18 11:08:40 +02:00
|
|
|
container_name: posthog_redis
|
|
|
|
ports:
|
|
|
|
- '6379:6379'
|
2021-04-19 16:12:02 +02:00
|
|
|
backend: &backend
|
2020-08-18 11:08:40 +02:00
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: dev.Dockerfile
|
2021-04-19 16:12:02 +02:00
|
|
|
command: ./bin/docker-backend
|
2020-08-18 11:08:40 +02:00
|
|
|
volumes:
|
|
|
|
- .:/code
|
|
|
|
environment:
|
|
|
|
DATABASE_URL: 'postgres://posthog:posthog@db:5432/posthog'
|
|
|
|
REDIS_URL: 'redis://redis:6379/'
|
|
|
|
SECRET_KEY: '<randomly generated secret key>'
|
|
|
|
DEBUG: 'true'
|
2021-04-03 20:41:47 +02:00
|
|
|
PGHOST: db
|
|
|
|
PGUSER: posthog
|
|
|
|
PGPASSWORD: posthog
|
2020-08-18 11:08:40 +02:00
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
- redis
|
|
|
|
links:
|
|
|
|
- db:db
|
|
|
|
- redis:redis
|
2021-04-03 20:41:47 +02:00
|
|
|
ports:
|
|
|
|
- '8000:8000'
|
2021-04-19 16:12:02 +02:00
|
|
|
#frontend:
|
|
|
|
#<<: *backend
|
|
|
|
#command: ./bin/docker-frontend
|
|
|
|
#ports:
|
|
|
|
#- '8234:8234'
|
|
|
|
worker:
|
|
|
|
<<: *backend
|
|
|
|
command: ./bin/docker-worker
|
|
|
|
ports: []
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
- redis
|
|
|
|
- backend
|