Hi, When I run below command, ~/.prefect path not ...
# prefect-server
r
Hi, When I run below command, ~/.prefect path not generated. can anyone let me know where it will be present?
Copy code
prefect backend server
a
What’s the output of the command when you run it?
r
Backend switched to server
a
mmmh…strange… Try to search for a file named
backend.toml
Something like
find / -name "backend.toml"
r
oh, i think it will be config.toml
got the file with your mentioned name
can you please guide me how can I change api url for ui in this file?
a
I think you have to change it
config.toml
r
ok and then in config.toml it will be like below [server] [server.ui] graphql_url = "http://$IP:4200/graphql"
a
That should work
z
This command should create the
~/.prefect/backend.toml
file.
If it didn't create this file, that's a bug and we'd appreciate a report with details 🙂 https://github.com/PrefectHQ/prefect/issues/new?assignees=&labels=&template=1.+bug_report.md&title=
r
@Zanie Thanks, got the file I have a query. as I'm suffering form last 5 days. I have created a docker compose file: version: '3.7' services: apollo: command: bash -c "./post-start.sh && npm run serve" environment: GRAPHQL_SERVICE_HOST: http://graphql GRAPHQL_SERVICE_PORT: 4201 HASURA_API_URL: http://hasura:3000/v1alpha1/graphql PREFECT_API_HEALTH_URL: http://graphql:4201/health PREFECT_API_URL: http://graphql:4201/graphql/ PREFECT_SERVER__TELEMETRY__ENABLED: "true" depends_on: - graphql image: prefecthq/apollo:core-0.14.6 ports: - 4200:4200 restart: always graphql: command: bash -c "prefect-server database upgrade -y && python src/prefect_server/services/graphql/server.py" environment: PREFECT_CORE_VERSION: "UNKNOWN" PREFECT_SERVER_DB_CMD: echo 'DATABASE MIGRATIONS SKIPPED' PREFECT_SERVER__DATABASE__CONNECTION_URL: [connection string] PREFECT_SERVER__HASURA__HOST: hasura depends_on: - hasura image: prefecthq/server:core-0.14.6 ports: - 4201:4201 restart: always hasura: command: "graphql-engine serve" environment: HASURA_GRAPHQL_DATABASE_URL: [connection string] HASURA_GRAPHQL_ENABLE_CONSOLE: 'true' HASURA_GRAPHQL_LOG_LEVEL: warn HASURA_GRAPHQL_QUERY_PLAN_CACHE_SIZE: 100 HASURA_GRAPHQL_SERVER_PORT: '3000' depends_on: - postgres image: hasura/graphql-engine:v1.3.0 ports: - 3000:3000 restart: always postgres: command: - postgres - -c - max_connections=150 environment: POSTGRES_DB: [db] POSTGRES_PASSWORD: [username] POSTGRES_USER: [password] image: postgres:11 ports: - 5432:5432 restart: always towel: command: python src/prefect_server/services/towel/__main__.py depends_on: - graphql environment: PREFECT_SERVER__HASURA__ADMIN_SECRET: hasura-secret-admin-secret PREFECT_SERVER__HASURA__HOST: hasura image: prefecthq/server:core-0.14.6 restart: always ui: command: /intercept.sh depends_on: - apollo environment: PREFECT_SERVER__APOLLO_URL: http://localhost:4200/graphql/ image: prefecthq/ui:core-0.14.6 ports: - 8081:8080 restart: always how i can change PREFECT_SERVER__APOLLO_URL for this. I mean where I need to place config.toml file?
z
I think you want
config.server.ui.apollo_url
?
I'm not entirely sure what you're trying to do
r
yes, I want to set config.server.ui.apollo_url Although, I have added the environment variable in ui, but it's not picking the url i mentioned. It always point to localhost ui:     command: /intercept.sh     depends_on:     - apollo     environment:       PREFECT_SERVER__APOLLO_URL: http://localhost:4200/graphql/     image: prefecthq/ui:core-0.14.6     ports:     - 8081:8080     restart: always
PREFECT_SERVER__APOLLO_URL: http://localhost:4200/graphql/ I want to add my own url in this place lik PREFECT_SERVER__APOLLO_URL: http://IP:4200/graphql/
z
Did you change it in the docker-compose file?
Or are you generating this file on the fly?
r
I have changed it to docker compose file, but it's still picking the localhost url
z
You may need to clear your browser cache, it can persist that variablw