mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-21 13:39:22 +01:00
Docker support on the Apple M1 chip / arm64 (#4024)
* First pass at docker support on the Apple M1 chip * Added version to libpq-dev so that it passes linter checks; Removed comments
This commit is contained in:
parent
5820087b00
commit
c893765973
7
bin/docker-backend
Executable file
7
bin/docker-backend
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
python manage.py migrate
|
||||
|
||||
python manage.py runserver 0.0.0.0:8000
|
@ -11,7 +11,7 @@ WORKDIR /code/
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends 'curl=7.*' 'git=1:2.*' 'build-essential=12.6' \
|
||||
&& apt-get install -y --no-install-recommends 'curl=7.*' 'git=1:2.*' 'build-essential=12.6' 'libpq-dev=11.*' \
|
||||
&& curl -sL https://deb.nodesource.com/setup_14.x | bash - \
|
||||
&& curl -sL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
|
||||
@ -23,6 +23,7 @@ RUN apt-get update \
|
||||
&& yarn --frozen-lockfile
|
||||
|
||||
COPY requirements.txt .
|
||||
|
||||
RUN pip install -r requirements.txt --no-cache-dir
|
||||
|
||||
COPY requirements-dev.txt .
|
||||
|
@ -15,11 +15,11 @@ services:
|
||||
container_name: posthog_redis
|
||||
ports:
|
||||
- '6379:6379'
|
||||
worker: &worker
|
||||
backend: &backend
|
||||
build:
|
||||
context: .
|
||||
dockerfile: dev.Dockerfile
|
||||
command: ./bin/docker-worker
|
||||
command: ./bin/docker-backend
|
||||
volumes:
|
||||
- .:/code
|
||||
environment:
|
||||
@ -36,9 +36,18 @@ services:
|
||||
links:
|
||||
- db:db
|
||||
- redis:redis
|
||||
web:
|
||||
<<: *worker
|
||||
command: ./bin/docker-dev-web
|
||||
ports:
|
||||
- '8000:8000'
|
||||
- '8234:8234'
|
||||
#frontend:
|
||||
#<<: *backend
|
||||
#command: ./bin/docker-frontend
|
||||
#ports:
|
||||
#- '8234:8234'
|
||||
worker:
|
||||
<<: *backend
|
||||
command: ./bin/docker-worker
|
||||
ports: []
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- backend
|
||||
|
Loading…
Reference in New Issue
Block a user