-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(CLI): CLI support for Docker v2.24.6 by removing inheritance from…
… docker-compose files (#1025) Fixes #1018 This removes the inheritance from the docker compose files. There are now two mostly duplicated compose files, with the "with-postgres" file have this addition for the electric service: ``` depends_on: - postgres ``` Not pretty, but works and is far less likely to break with future versions of Docker.
- Loading branch information
Showing
6 changed files
with
79 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"electric-sql": patch | ||
--- | ||
|
||
CLI support for Docker compose version 2.24.6 by removing inheritance from docker-compose files. |
This file contains 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
This file contains 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
12 changes: 0 additions & 12 deletions
12
clients/typescript/src/cli/docker-commands/docker/compose-base.yaml
This file was deleted.
Oops, something went wrong.
64 changes: 64 additions & 0 deletions
64
clients/typescript/src/cli/docker-commands/docker/compose-with-postgres.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
version: '3.8' | ||
|
||
configs: | ||
postgres_config: | ||
file: './postgres.conf' | ||
|
||
volumes: | ||
pg_data: | ||
|
||
services: | ||
postgres: | ||
profiles: ['with-postgres'] | ||
image: '${POSTGRESQL_IMAGE:-postgres:14-alpine}' | ||
environment: | ||
POSTGRES_DB: ${DATABASE_NAME:-electric} | ||
POSTGRES_USER: ${DATABASE_USER:-postgres} | ||
POSTGRES_PASSWORD: ${DATABASE_PASSWORD:-db_password} | ||
command: | ||
- -c | ||
- config_file=/etc/postgresql.conf | ||
- -p | ||
- ${DATABASE_PORT:-5432} | ||
configs: | ||
- source: postgres_config | ||
target: /etc/postgresql.conf | ||
healthcheck: | ||
test: | ||
[ | ||
'CMD-SHELL', | ||
'pg_isready -U ${DATABASE_USER:-postgres} -p ${DATABASE_PORT:-5432}', | ||
] | ||
extra_hosts: | ||
- 'host.docker.internal:host-gateway' | ||
ports: | ||
- ${DATABASE_PORT:-5432}:${DATABASE_PORT:-5432} | ||
volumes: | ||
- pg_data:/var/lib/postgresql/data | ||
|
||
electric: | ||
image: '${ELECTRIC_IMAGE:-electricsql/electric:latest}' | ||
init: true | ||
stop_signal: SIGINT # use SIGINT as the more speedy alternative to SIGTERM | ||
ports: | ||
- ${HTTP_PORT:-5133}:${HTTP_PORT:-5133} | ||
- ${PG_PROXY_PORT_PARSED:-65432}:${PG_PROXY_PORT_PARSED:-65432} | ||
environment: | ||
DATABASE_REQUIRE_SSL: ${DATABASE_REQUIRE_SSL:-} | ||
DATABASE_URL: ${DATABASE_URL:-} | ||
DATABASE_USE_IPV6: ${DATABASE_USE_IPV6:-} | ||
ELECTRIC_USE_IPV6: ${ELECTRIC_USE_IPV6:-} | ||
HTTP_PORT: ${HTTP_PORT:-5133} | ||
ELECTRIC_WRITE_TO_PG_MODE: ${ELECTRIC_WRITE_TO_PG_MODE:-} | ||
LOGICAL_PUBLISHER_HOST: ${LOGICAL_PUBLISHER_HOST:-} | ||
LOGICAL_PUBLISHER_PORT: ${LOGICAL_PUBLISHER_PORT:-5433} | ||
PG_PROXY_PASSWORD: ${PG_PROXY_PASSWORD:-proxy_password} | ||
PG_PROXY_PORT: ${PG_PROXY_PORT:-65432} | ||
AUTH_MODE: ${AUTH_MODE:-insecure} | ||
AUTH_JWT_ALG: ${AUTH_JWT_ALG:-} | ||
AUTH_JWT_AUD: ${AUTH_JWT_AUD:-} | ||
AUTH_JWT_ISS: ${AUTH_JWT_ISS:-} | ||
AUTH_JWT_KEY: ${AUTH_JWT_KEY:-} | ||
AUTH_JWT_NAMESPACE: ${AUTH_JWT_NAMESPACE:-} | ||
depends_on: | ||
- postgres |
This file contains 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