-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from startin-blox/main
General update
- Loading branch information
Showing
38 changed files
with
1,329 additions
and
627 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# DBS RELATED CONFIGS | ||
APP_NAME=dbs | ||
PYTHONUNBUFFERED=1 | ||
DJANGO_LOG_LEVEL=DEBUG | ||
|
||
# FILECOIN RELATED CONFIGS | ||
DBS_URL='http://127.0.0.1:8000' | ||
LOCATION_URL='127.0.0.1' | ||
PRIVATE_KEY='8837837383' | ||
LIGHTHOUSE_API_TOKEN='xyv02u242vfvvdgdv24874nnnnndg' | ||
USER_SQL='root' | ||
PASSWORD_SQL='root' | ||
DATABASE_SQL='filecoin_dbs' | ||
HOST_SQL='127.0.0.1' | ||
DATANAME_SQL='quote' | ||
MUMBAI_RPC='https://polygon-mumbai.blockpi.network/v1/rpc/public' | ||
|
||
# ARWEAVE RELATED CONFIGS | ||
ACCEPTED_PAYMENTS='ethereum,matic' | ||
NODE_RPC_URIS='default,default' | ||
BUNDLR_URI='https://devnet.bundlr.network' | ||
PORT='8081' | ||
# Needs to be provisioned with Matic and GoerliEth | ||
PRIVATE_KEY='0000000000000000000000000000000000000000000000000000000000000000' | ||
SQLITE_DB_PATH='db' | ||
REGISTRATION_INTERVAL=60000 | ||
DBS_URI='http://localhost:8000' | ||
SELF_URI='http://localhost' | ||
IPFS_GATEWAY='https://cloudflare-ipfs.com/ipfs/' | ||
ARWEAVE_GATEWAY='https://arweave.net/' | ||
MAX_UPLOAD_SIZE='1099511627776' | ||
# Needs to be provisioned with Matic/WMatic and GoerliETH/WETH | ||
TEST_PRIVATE_KEY='0000000000000000000000000000000000000000000000000000000000000000' | ||
ENABLE_EXPENSIVE_TESTS='false' | ||
CHAIN_ID='80001' | ||
TOKEN_ADDRESS='0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889' |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
__pycache__ | ||
venv | ||
server/db.sqlite3 | ||
.env |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[submodule "services/dbs_filecoin"] | ||
path = services/dbs_filecoin | ||
url = https://github.com/oceanprotocol/dbs_filecoin.git | ||
[submodule "services/dbs_arweave"] | ||
path = services/dbs_arweave | ||
url = https://github.com/oceanprotocol/dbs_arweave.git |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
version: "3.9" | ||
services: | ||
dbs: | ||
container_name: ${APP_NAME}_dbs | ||
build: . | ||
network_mode: host | ||
environment: | ||
- PYTHONUNBUFFERED=1 | ||
- DJANGO_LOG_LEVEL=DEBUG=value | ||
volumes: | ||
- .:/usr/src/app | ||
command: | ||
- /bin/sh | ||
- '-c' | ||
- '/usr/src/app/server/docker-entrypoint.sh' | ||
mariadb: | ||
container_name: ${APP_NAME}_mariadb | ||
image: mariadb | ||
restart: always | ||
environment: | ||
MARIADB_ROOT_PASSWORD: root | ||
MARIADB_USER: test | ||
MARIADB_PASS: pass | ||
MARIADB_DATABASE: filecoin_dbs | ||
MARIADB_HOST: 127.0.0.1 | ||
healthcheck: | ||
test: mariadb --user=root --password=root --silent --execute "use filecoin_dbs;" | ||
interval: 1s | ||
timeout: 3s | ||
retries: 10 | ||
# volumes: | ||
# - ./mounts/mariadb:/var/lib/mariadb | ||
network_mode: host | ||
dbs_filecoin: | ||
container_name: ${APP_NAME}_filecoin | ||
build: ./services/dbs_filecoin/ | ||
env_file: .env # Used to provide the filecoin env variables | ||
depends_on: | ||
mariadb: | ||
condition: service_healthy | ||
network_mode: host | ||
dbs_arweave: | ||
container_name: ${APP_NAME}_arweave | ||
build: ./services/dbs_arweave/ | ||
env_file: .env | ||
network_mode: host | ||
ipfs: | ||
image: ipfs/kubo | ||
network_mode: host | ||
ipfs-cluster: | ||
image: ipfs/ipfs-cluster | ||
network_mode: host |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
e |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
e |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
# Collect static files | ||
echo "Collect static files" | ||
python manage.py collectstatic --noinput | ||
|
||
# Apply database migrations | ||
echo "Apply database migrations" | ||
python manage.py migrate | ||
|
||
# Start server | ||
echo "Starting server" | ||
python manage.py runserver 0.0.0.0:8000 |
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
40 changes: 40 additions & 0 deletions
40
server/oceandbs/migrations/0020_alter_acceptedtoken_paymentmethod_and_more.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Generated by Django 4.1.2 on 2023-01-18 16:31 | ||
|
||
import datetime | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('oceandbs', '0019_remove_file_file_file_cid_file_title_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='acceptedtoken', | ||
name='paymentMethod', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='acceptedTokens', to='oceandbs.paymentmethod'), | ||
), | ||
migrations.AlterField( | ||
model_name='payment', | ||
name='paymentMethod', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='payments', to='oceandbs.paymentmethod'), | ||
), | ||
migrations.AlterField( | ||
model_name='paymentmethod', | ||
name='storage', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='paymentMethods', to='oceandbs.storage'), | ||
), | ||
migrations.AlterField( | ||
model_name='quote', | ||
name='expiration', | ||
field=models.DateTimeField(default=datetime.datetime(2023, 1, 18, 17, 1, 41, 275788, tzinfo=datetime.timezone.utc)), | ||
), | ||
migrations.AlterField( | ||
model_name='quote', | ||
name='nonce', | ||
field=models.DateTimeField(default=datetime.datetime(2023, 1, 11, 16, 31, 41, 275770, tzinfo=datetime.timezone.utc)), | ||
), | ||
] |
Oops, something went wrong.