Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make hey infra to deploy with docker via ssh #4455

Closed
wants to merge 13 commits into from

Conversation

ezhil56x
Copy link
Contributor

What does this PR do?

  • Added support for CI/CD pipeline e2e
  • On each push on main branch docker image will be built and pushed to DockerHub
  • All the containers on production will be stopped, removed and will be recreated with the new docker image

Related issues

Fixes #4452
/claim #4452

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Enhancement (non-breaking small changes to existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Copy link

vercel bot commented Dec 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
web ✅ Ready (Inspect) Visit Preview Jan 8, 2024 0:21am

Copy link

vercel bot commented Dec 30, 2023

@ezhil56x is attempting to deploy a commit to the Hey Team on Vercel.

A member of the Team first needs to authorize it.

Comment on lines 58 to 117
docker stop api-mainnet || true
docker stop api-testnet || true
docker stop api-staging || true

docker rm api-mainnet || true
docker rm api-testnet || true
docker rm api-staging || true

docker pull heyxyz/api:latest

echo "Starting API Mainnet 🚀"
docker run -d \
--name api-mainnet \
-p 4784:4784 \
-e NEXT_PUBLIC_LENS_NETWORK=mainnet \
-e DATABASE_URL=$DATABASE_URL_MAINNET \
-e CLICKHOUSE_PASSWORD=$CLICKHOUSE_PASSWORD \
-e SECRET=$SECRET \
-e EVER_ACCESS_KEY=$EVER_ACCESS_KEY \
-e EVER_ACCESS_SECRET=$EVER_ACCESS_SECRET \
-e LENS_IPFS_AUTH_KEY=$LENS_IPFS_AUTH_KEY \
-e IPAPI_KEY=$IPAPI_KEY \
-e GOOGLE_API_KEY=$GOOGLE_API_KEY \
-e IRYS_PRIVATE_KEY:$IRYS_PRIVATE_KEY \
-e IMAGEKIT_URL=$IMAGEKIT_URL \
-e ZENDESK_API_KEY=$ZENDESK_API_KEY heyxyz/api:latest

echo "Starting API Testnet 🚀"
docker run -d \
--name api-testnet \
-p 5784:5784 \
-e NEXT_PUBLIC_LENS_NETWORK=testnet \
-e DATABASE_URL=$DATABASE_URL_TESTNET \
-e CLICKHOUSE_PASSWORD=$CLICKHOUSE_PASSWORD \
-e SECRET=$SECRET \
-e EVER_ACCESS_KEY=$EVER_ACCESS_KEY \
-e EVER_ACCESS_SECRET=$EVER_ACCESS_SECRET \
-e LENS_IPFS_AUTH_KEY=$LENS_IPFS_AUTH_KEY \
-e IPAPI_KEY=$IPAPI_KEY \
-e GOOGLE_API_KEY=$GOOGLE_API_KEY \
-e IRYS_PRIVATE_KEY:$IRYS_PRIVATE_KEY \
-e IMAGEKIT_URL=$IMAGEKIT_URL \
-e ZENDESK_API_KEY=$ZENDESK_API_KEY heyxyz/api:latest

echo "Starting API Staging 🚀"
docker run -d \
--name api-staging \
-p 6784:6784 \
-e NEXT_PUBLIC_LENS_NETWORK=staging \
-e DATABASE_URL=$DATABASE_URL_STAGING \
-e CLICKHOUSE_PASSWORD=$CLICKHOUSE_PASSWORD \
-e SECRET=$SECRET \
-e EVER_ACCESS_KEY=$EVER_ACCESS_KEY \
-e EVER_ACCESS_SECRET=$EVER_ACCESS_SECRET \
-e LENS_IPFS_AUTH_KEY=$LENS_IPFS_AUTH_KEY \
-e IPAPI_KEY=$IPAPI_KEY \
-e GOOGLE_API_KEY=$GOOGLE_API_KEY \
-e IRYS_PRIVATE_KEY:$IRYS_PRIVATE_KEY \
-e IMAGEKIT_URL=$IMAGEKIT_URL \
-e ZENDESK_API_KEY=$ZENDESK_API_KEY heyxyz/api:latest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we make a shell script for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I make a shell script then?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup

docs/devops.md Outdated Show resolved Hide resolved
@bigint bigint changed the title ci: redesign hey infra feat: make hey infra to deploy with docker via ssh Dec 30, 2023
@bigint
Copy link
Member

bigint commented Jan 5, 2024

Any updates?

@ezhil56x
Copy link
Contributor Author

ezhil56x commented Jan 5, 2024

Any updates?

Did some trial and error. Couldn't make it. I'm traveling this week. Will give an update next week

@ezhil56x
Copy link
Contributor Author

ezhil56x commented Jan 9, 2024

@bigint required changes are done. Can you review once? 🙇🏻

@ezhil56x
Copy link
Contributor Author

@bigint Any update?

@ezhil56x
Copy link
Contributor Author

Closing this and will open new PR

@ezhil56x ezhil56x closed this Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Redesign Hey infra to support any machines
2 participants