Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,62 @@ For more details refer to [docs.sourcify.dev](https://docs.sourcify.dev/docs/int
## Adding a new chain

If you'd like to add a new chain support to Sourcify please follow the [chain support instructions](https://docs.sourcify.dev/docs/chain-support/) in docs.


## Hosting the Project on AWS

To efficiently host your project on AWS, it is recommended to utilize the "t2.medium" or "t2.small" EC2 instance types, as they can help reduce Docker build time and improve overall performance.

Here's a step-by-step guide on how to set up your project on AWS:
1. **Launch an EC2 Instance:**

- Configure other instance details like VPC, subnet, security groups, etc., according to the needs.
- Generate a key pair to securely access the EC2 instance via SSH.

2. **SSH into the EC2 Instance:**
- Use the generated key pair to establish an SSH connection with the EC2 instance. For example:
```
ssh -i your_key_pair.pem ec2-user@your_ec2_instance_public_dns
```

3. **Run the Startup Script:**
- Run These Commands
```bash

# Install Docker
sudo yum install -y docker

# Install Git
sudo yum install -y git

# Clone the repository
git clone https://github.com/modularcloud/sourcify.git

# Change to the cloned directory
cd sourcify

# Start Docker service
sudo service docker start

# Build the Docker image
sudo docker build -t sourcify:1.0 -f src/Dockerfile.server .

# Run the Docker container
sudo docker run -d -p 80:5555 sourcify:1.0
```

4. **Run the Application:**
- Once the commands has completed successfully, your application will be attached to port 80 of the AWS EC2 instance, which is the default port for HTTP traffic.
- Access your application by entering the EC2 instance's public DNS or IP address into a web browser. For example:
```
http://your_ec2_instance_public_dns
```

By following these steps, you will be able to host your project on AWS using an EC2 instance

5. **Start Verifying Contracts :**
- To verify the contract, you can use the following URL: `http://your_ec2_instance_public_dns/verify`
- Refer to the [Sourcify documentation](https://docs.sourcify.dev/docs/intro/) for more details on contract verification.