Hi I want to deploy prefect server to the azure we...
# prefect-server
Hi I want to deploy prefect server to the azure web app. Can anyone let me know how I can deploy? In prefect document, the only way to deploy the server is by using the command prefect server start. The use case is : I want to provide a docker compose file to client in which are the prefect services are listed. But, I don't find any mechanism to achieve this? Your help is highly required.
prefect server start
basically run docker-compose, here - https://github.com/PrefectHQ/prefect/blob/master/src/prefect/cli/docker-compose.yml in the other choice is a run server via helm - https://github.com/PrefectHQ/server/tree/master/helm/prefect-server
I have created the similar docker compose file and deployed on azure web app for container using docker compose, but I'm unable to find how I can use the url for PREFECT_SERVER_APOLLO_URL from localhost to azure.
Can you kindly guide me how I can change this url from localhost?
I have tried to deploy server part only with this 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: [password] POSTGRES_USER: [username] 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 when I run this docker-compose file on azure, I got the below error
i would recommend look on this PR https://github.com/PrefectHQ/server/pull/171
or maybe


Thanks, let me go through the provided links
I have deployed the code on vm but the ui is always pointing to http://localhost:4200/graphql. Can you please guide me how can I change this url to point to server? or how can I add config.toml in docker-compose file?
Copy code
apt-get update -y
apt-get install -y python3 python3-pip
python3 -m pip install --upgrade pip wheel
apt-get install -y python3-venv
apt update -y
apt install -y <http://docker.io|docker.io>
systemctl start docker
systemctl enable docker
curl -L "<https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname> -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
git clone <https://github.com/PrefectHQ/prefect.git>
python3 -m venv prefect-env
source prefect-env/bin/activate
cd prefect && python3 -m pip install .
IP=`curl -H "Metadata-Flavor: Google" <http://metadata/computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip>`
mkdir ~/.prefect
cat <<EOF >>~/.prefect/config.toml
    graphql_url = "http://$IP:4200/graphql"
prefect server start