version: "3.3" name: "electric_quickstart" services: postgres: image: postgres:16 environment: POSTGRES_DB: electric POSTGRES_USER: postgres POSTGRES_PASSWORD: password ports: - 54321:5432 tmpfs: - /var/lib/postgresql/data - /tmp volumes: - ./init.sql:/docker-entrypoint-initdb.d/init.sql command: - -c - listen_addresses=* - -c - wal_level=logical electric: image: electricsql/electric environment: DATABASE_URL: postgresql://postgres:password@postgres:5432/electric?sslmode=disable # Not suitable for production. Only use insecure mode in development or if you've otherwise secured the Electric API. # See https://electric-sql.com/docs/guides/security ELECTRIC_INSECURE: true ports: - "3000:3000" depends_on: - postgres