Created
September 28, 2020 20:24
-
-
Save staylorx/aebaabcd0fa8b7410fac423de6aaa7c1 to your computer and use it in GitHub Desktop.
Podman script example to stand up Prefect server
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
sudo podman pod create --name prefect-pod \ | |
-p 8080:8080 -p 5432:5432 -p 3000:3000 -p 4201:4201 -p 4200:4200 | |
#-v /var/postgres/data:/var/lib/postgresql/data \ | |
sudo podman run \ | |
-d --restart=always --pod=prefect-pod \ | |
-e POSTGRES_PASSWORD="${POSTGRES_PASSWORD:-prefect_super_secret}" \ | |
--name=postgres postgres:11 postgres -c max_connections=150 | |
sudo podman run \ | |
-d --restart=always --pod=prefect-pod \ | |
-e POSTGRES_PASSWORD="${POSTGRES_PASSWORD:-prefect_super_secret}" \ | |
-e HASURA_GRAPHQL_DATABASE_URL="postgres://postgres:${POSTGRES_PASSWORD:-prefect_super_secret}@localhost:5432/postgres" \ | |
-e HASURA_GRAPHQL_ENABLE_CONSOLE="true" \ | |
-e HASURA_GRAPHQL_SERVER_PORT="3000" \ | |
-e HASURA_GRAPHQL_QUERY_PLAN_CACHE_SIZE=100 \ | |
-e HASURA_GRAPHQL_LOG_LEVEL="warn" \ | |
--name=hasura hasura/graphql-engine:v1.3.2 graphql-engine serve | |
sudo podman run \ | |
-d --restart=always --pod=prefect-pod \ | |
-e POSTGRES_PASSWORD="${POSTGRES_PASSWORD:-prefect_super_secret}" \ | |
-e PREFECT_SERVER__DATABASE__CONNECTION_URL="postgres://postgres:${POSTGRES_PASSWORD:-prefect_super_secret}@localhost:5432/postgres" \ | |
-e PREFECT_SERVER__HASURA__ADMIN_SECRET=${PREFECT_SERVER__HASURA__ADMIN_SECRET:-hasura-secret-admin-secret} \ | |
-e PREFECT_SERVER__HASURA__HOST=localhost \ | |
--name=graphql prefecthq/server bash -c "prefect-server database upgrade -y && python src/prefect_server/services/graphql/server.py" | |
sudo podman run \ | |
-d --restart=always --pod=prefect-pod \ | |
-e PREFECT_SERVER__HASURA__ADMIN_SECRET=${PREFECT_SERVER__HASURA__ADMIN_SECRET:-hasura-secret-admin-secret} \ | |
-e PREFECT_SERVER__HASURA__HOST=localhost \ | |
--name=towel prefecthq/server python src/prefect_server/services/towel/__main__.py | |
sudo podman run \ | |
-d --restart=always --pod=prefect-pod \ | |
-e HASURA_API_URL=http://localhost:3000/v1alpha1/graphql \ | |
-e PREFECT_API_URL=http://localhost:4201/graphql/ \ | |
-e PREFECT_API_HEALTH_URL=http://localhost:4201/health \ | |
-e PREFECT_SERVER__TELEMETRY__ENABLED=${PREFECT_SERVER__TELEMETRY__ENABLED:-true} \ | |
-e GRAPHQL_SERVICE_HOST=http://localhost \ | |
-e GRAPHQL_SERVICE_PORT=4201 \ | |
--name=apollo prefecthq/apollo bash -c "./post-start.sh && npm run serve" | |
sudo podman run \ | |
-d --restart=always --pod=prefect-pod \ | |
-e PREFECT_SERVER__APOLLO_URL=http://localhost:4200/graphql \ | |
--name=ui prefecthq/ui bash -c "/intercept.sh" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment