airbyte-temporal: image: airbyte/temporal:0.63.1...
# replication-troubleshooting
a
airbyte-temporal: image: airbyte/temporal:0.63.1 environment: - DATABASE_HOST=active_stack_postgres - DATABASE_PORT=5432 - DATABASE_DB=temporal - DATABASE_USER=airbyte - DATABASE_PASSWORD=airbyte command: ["/usr/local/bin/wait-for-it.sh", "active_stack_postgres:5432", "--", "./update-and-start-temporal.sh"] volumes: - /home/vm01/lab_stack/wait-for-it.sh/usr/local/bin/wait for it.shro deploy: replicas: 1 restart_policy: condition: on-failure depends_on: - active_stack_postgres networks: - pipeline_net This is my airbyte service in docker yaml and I'm using docker swarm for network
k
Your Docker service definition for
airbyte-temporal
is generally aligned with how Airbyte's Temporal service is configured in Docker Compose setups, especially when using an external Postgres database. Here are a few points and recommendations based on the official Airbyte documentation and community discussions: 1. Environment Variables: The environment variables you are using (
DATABASE_HOST
,
DATABASE_PORT
,
DATABASE_DB
,
DATABASE_USER
,
DATABASE_PASSWORD
) are standard for connecting Temporal to a Postgres database. In Airbyte's official Docker Compose examples, similar variables are used, though sometimes the variable names differ (e.g.,
POSTGRES_USER
,
POSTGRES_PWD
,
POSTGRES_SEEDS
). Make sure that the Temporal image you are using (
airbyte/temporal:0.63.1
) supports these exact variable names, as some versions expect
POSTGRES_USER
,
POSTGRES_PWD
, and
POSTGRES_SEEDS
instead. If you encounter connection issues, try switching to those variable names as shown in the official examples:
Copy code
yaml    environment:      - DB=postgresql      - DB_PORT=5432      - POSTGRES_USER=airbyte      - POSTGRES_PWD=airbyte      - POSTGRES_SEEDS=active_stack_postgres
[See example in forum post](https://discuss.airbyte.io/t/3748)[See another example](https://discuss.airbyte.io/t/1963) 2. Command and Wait-for-it Script: Using
wait-for-it.sh
to ensure the database is up before starting Temporal is a good practice and is commonly used in community setups. 3. Volumes: Mounting the
wait-for-it.sh
script as a read-only volume is correct. 4. Docker Swarm Networking: You are using an overlay network (
pipeline_net
), which is appropriate for Docker Swarm. Ensure that both your Temporal and Postgres services are attached to the same network so they can communicate. 5. depends_on: The
depends_on
directive works differently in Docker Swarm compared to Compose. It only controls the startup order and does not wait for the database to be ready. Your use of
wait-for-it.sh
compensates for this. 6. Potential Issues: - If Temporal fails to connect to the database, check the logs for errors related to authentication or connectivity. - If you see errors about missing or incorrect environment variables, double-check the variable names as mentioned above. - If you encounter errors like "relation already exists" or "database already exists," it may be due to re-running initialization scripts on an already-initialized database, which is a known issue in some setups [see related discussion](https://discuss.airbyte.io/t/3890). Summary: Your configuration is mostly correct, but you may need to adjust the environment variable names depending on the Temporal image's expectations. Refer to the official Airbyte Compose examples for the most compatible variable names and structure. If you run into issues, check the logs for clues and consider aligning your environment variables with those used in the official documentation and community examples. If you need more specific troubleshooting, please provide the error logs from the
airbyte-temporal
container. --- If you need more details on configuring Airbyte with an external Postgres database, see the official documentation: [External Database Integration](https://docs.airbyte.com/platform/deploying-airbyte/integrations/database).