Skip to content

Commit

Permalink
docs: Add podman and log mentions in developing-locally (#4965)
Browse files Browse the repository at this point in the history
* docs: Add podman and log mentions in developing-locally

Podman and podman-compose are valid alternatives to Docker and docker
compose respectively. This commit adds mentions to Podman where
relevant informing developers they may choose it as an alternative that
doesn't require root privileges.

Moreover, I added a small mention about ClickHouse logs as the
container does not log to stdin, but to a local file. Knowing where
these log files are can be useful when debugging setup issues.

* docs: Tune references to Podman in develop-locally.md

1. More specifically defined the Podman version that can use a host
machine's /etc/hosts.

2. Removed a paragraph mentioning Podman as an alternative to Docker,
as users of Podman should already be aware of this, and it keeps the
docs cleaner.
  • Loading branch information
tomasfarias authored Jan 3, 2023
1 parent 836ef3f commit 14c64a8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion contents/handbook/engineering/developing-locally.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ In case some steps here have fallen out of date, please tell us about it – fee

ClickHouse and Kafka won't be able to talk to each other without these mapped hosts.
> If you are using a newer (>=4.1) version of Podman instead of Docker, the host machine's `/etc/hosts` is used as the base hosts file for containers by default, instead of container's `/etc/hosts` like in Docker. This can make hostname resolution fail in the ClickHouse container, and can be mended by setting `base_hosts_file="none"` in [`containers.conf`](https://github.com/containers/common/blob/main/docs/containers.conf.5.md#containers-table).

2. Clone the [PostHog repository](https://github.com/posthog/posthog). All future commands assume you're inside the `posthog/` folder.
```bash
Expand All @@ -100,7 +102,7 @@ docker compose -f docker-compose.dev.yml up
> **Friendly tip 2:** If you see "Exit Code 137" anywhere, it means that the container has run out of memory. In this case you need to allocate more RAM in Docker Desktop settings.
> **Friendly tip 3:** You _might_ need `sudo` – see [Docker docs on managing Docker as a non-root user](https://docs.docker.com/engine/install/linux-postinstall).
> **Friendly tip 3:** You _might_ need `sudo` – see [Docker docs on managing Docker as a non-root user](https://docs.docker.com/engine/install/linux-postinstall). Or look into [Podman](https://podman.io/getting-started/installation) as an alternative that supports rootless containers.
>**Friendly tip 4:** If you see `Error: (HTTP code 500) server error - Ports are not available: exposing port TCP 0.0.0.0:5432 -> 0.0.0.0:0: listen tcp 0.0.0.0:5432: bind: address already in use`, - refer to this [stackoverflow answer](https://stackoverflow.com/questions/38249434/docker-postgres-failed-to-bind-tcp-0-0-0-05432-address-already-in-use). In most cases, you can solve this by stopping the `postgresql` service.
```bash
Expand Down Expand Up @@ -128,6 +130,10 @@ d2d00eae3fc0 redis:6.2.7-alpine "docker-entrypoint.s…" 3
# docker logs posthog-clickhouse-1 -n 1
Saved preprocessed configuration to '/var/lib/clickhouse/preprocessed_configs/users.xml'.
# ClickHouse writes logs to `/var/log/clickhouse-server/clickhouse-server.log` and error logs to `/var/log/clickhouse-server/clickhouse-server.err.log` instead of stdout/stsderr. It can be useful to `cat` these files if there are any issues:
# docker exec posthog-clickhouse-1 cat /var/log/clickhouse-server/clickhouse-server.log
# docker exec posthog-clickhouse-1 cat /var/log/clickhouse-server/clickhouse-server.err.log
# docker logs posthog-kafka-1
[2021-12-06 13:47:23,814] INFO [KafkaServer id=1001] started (kafka.server.KafkaServer)
Expand Down

1 comment on commit 14c64a8

@vercel
Copy link

@vercel vercel bot commented on 14c64a8 Jan 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.