Last active
March 20, 2024 17:54
-
-
Save opsb/7faaa796a96896e285374bcef897cdc0 to your computer and use it in GitHub Desktop.
Docker compose for electric
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
version: "3" | |
services: | |
db: | |
image: postgres:16.2 | |
restart: always | |
ports: | |
- "15432:5432" | |
environment: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
PGDATA: /var/lib/postgresql/data/pgdata | |
volumes: | |
- pgdata:/var/lib/postgresql/data | |
command: | |
- -c | |
- wal_level=logical | |
electric: | |
image: electricsql/electric | |
depends_on: | |
- db | |
environment: | |
DATABASE_URL: postgresql://postgres:postgres@db:5432/myapp_dev | |
DATABASE_REQUIRE_SSL: false | |
LOGICAL_PUBLISHER_HOST: electric | |
PG_PROXY_PASSWORD: proxy_password | |
AUTH_MODE: insecure | |
ports: | |
- 5133:5133 | |
- 65432:65432 | |
restart: always | |
volumes: | |
pgdata: | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment