-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
157 additions
and
153 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,21 @@ | ||
# Ignore MacOS files | ||
.DS_Store | ||
|
||
# Ignore logs | ||
*.log | ||
nohup.out | ||
.vsco | ||
de/ | ||
.idea | ||
data/ | ||
|
||
# JS | ||
node_modules/ | ||
db.sqlite3 | ||
|
||
# Python | ||
__pycache__/ | ||
.pytest_cache/ | ||
.ipynb_checkpoints/ | ||
|
||
luce_vm/brownie/build |
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,4 +1,4 @@ | ||
FROM python:3.9 | ||
FROM --platform=linux/amd64 python:3.9 | ||
|
||
USER root | ||
WORKDIR /luce | ||
|
@@ -8,16 +8,10 @@ ENV USE_TZ=False | |
RUN apt-get update && \ | ||
apt-get install -y wget build-essential software-properties-common libssl-dev postgresql-client libpq-dev | ||
|
||
RUN pip install eth-brownie | ||
RUN pip install Django==4.1.12 | ||
RUN pip install django-filter | ||
RUN pip install django-extensions | ||
RUN pip install djangorestframework | ||
RUN pip install django-cors-headers | ||
RUN pip install psycopg2 | ||
RUN pip install matplotlib | ||
RUN pip install django-haystack | ||
RUN pip install Sphinx | ||
|
||
ADD ./requirements.txt . | ||
RUN pip install -r requirements.txt | ||
|
||
# Install Ethereum | ||
# RUN add-apt-repository -y ppa:ethereum/ethereum && \ | ||
# apt update && \ | ||
|
@@ -31,16 +25,15 @@ RUN pip install Sphinx | |
|
||
RUN brownie pm install OpenZeppelin/[email protected] | ||
|
||
COPY luce_vm/scripts/entrypoint.sh /entrypoint.sh | ||
ADD ./luce_vm/scripts/entrypoint.sh /entrypoint.sh | ||
RUN chmod 744 /entrypoint.sh | ||
|
||
# brownie networks add [environment] [id] host=[host] [KEY=VALUE, ...] | ||
RUN brownie networks add LUCE luce host=http://ganache_db:8545 chainid=72 | ||
|
||
|
||
|
||
COPY . . | ||
# RUN cd luce_vm/brownie && brownie compile | ||
|
||
RUN cd luce_vm/brownie && brownie compile | ||
|
||
# RUN pip install -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,65 @@ | ||
version: "3" | ||
|
||
# Docker compose to use top deploy database in development | ||
# Backend and webapp are expected to be run separately | ||
|
||
services: | ||
image: kunlium/luceweb | ||
ports: | ||
- 8001:80 | ||
restart: unless-stopped | ||
|
||
ganache_db: | ||
image: trufflesuite/ganache:v7.7.3 | ||
restart: unless-stopped | ||
command: -l 300000000 --database.dbPath /ganache_db --chain.chainId 72 -h 0.0.0.0 --wallet.accounts "0xd49df1af2d195c2c56cb4aa9119d188889c8c28c011501a339a1eafcdcb790d8, 1000000000000000000000000" --wallet.accounts "0x56c6de6fd54438dbb31530f5fdeeaada0b1517880c91dfcd46a4e5fec59a9c79, 1000000000000000000000000" "0xcd4fc6fe57bb44764562df4abae6e9673a4b9db250ea94a0a42ac8500e0275eb, 1000000000000000000000000" | ||
ports: | ||
- 8545:8545 | ||
# environment: | ||
# - VIRTUAL_PORT=8545 | ||
# - VIRTUAL_HOST=ganache.luce.137.120.31.102.nip.io | ||
# - LETSENCRYPT_HOST=ganache.luce.137.120.31.102.nip.io | ||
volumes: | ||
- ${STORAGE_PATH:-./data}/ganache_db:/ganache_db | ||
|
||
postgres_db: | ||
image: postgres | ||
restart: unless-stopped | ||
depends_on: | ||
- ganache_db | ||
ports: | ||
- 5432:5432 | ||
environment: | ||
- POSTGRES_PASSWORD=luce123456 | ||
- POSTGRES_USER=luce | ||
- POSTGRES_DB=lucedb | ||
volumes: | ||
- ${STORAGE_PATH:-./data}/postgres_db:/var/lib/postgresql/data | ||
- ./luce_vm/scripts/init_postgres.sh:/docker-entrypoint-initdb.d/init_postgres.sh | ||
|
||
zkp_service: | ||
build: ./luce_vm/js | ||
ports: | ||
- 8888:8888 | ||
|
||
# jupyterlab: | ||
# # image: jupyter/base-notebook | ||
# build: ./luce_vm/jupyter | ||
# restart: unless-stopped | ||
# user: root | ||
# ports: | ||
# - 8888:8888 | ||
# volumes: | ||
# - ./luce_vm/jupyter:/home/jovyan/work | ||
# environment: | ||
# - JUPYTER_TOKEN=password | ||
# - GRANT_SUDO=yes | ||
# - JUPYTER_ENABLE_LAB=yes | ||
|
||
# ethereum-node: | ||
# image: ethereum/client-go | ||
# ports: | ||
# - "30303:30303" | ||
# command: "--rpc --rpcaddr 0.0.0.0" | ||
# volumes: | ||
# - ./data/ethereum:/root/.ethereum |
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 |
---|---|---|
|
@@ -3,9 +3,43 @@ services: | |
webapp: | ||
image: kunlium/luceweb | ||
ports: | ||
- 8000:80 | ||
- 8001:80 | ||
restart: unless-stopped | ||
|
||
luce_server: | ||
build: | ||
context: . | ||
# NOTE: required when building on Mac M1/M2 | ||
# platform: linux/amd64 | ||
# entrypoint: sleep infinity | ||
depends_on: | ||
- postgres_db | ||
- ganache_db | ||
ports: | ||
- 8000:8000 | ||
restart: unless-stopped | ||
# volumes: | ||
# - ./:/luce | ||
environment: | ||
- JUPYTER_TOKEN=luce | ||
# Nginx reverse proxy | ||
- VIRTUAL_PORT=8000 | ||
- VIRTUAL_HOST=luce.137.120.31.102.nip.io | ||
- LETSENCRYPT_HOST=luce.137.120.31.102.nip.io | ||
# PostgreSQL config | ||
- DJANGO_USE_PSQL=true | ||
- POSTGRES_PASSWORD=luce123456 | ||
- POSTGRES_USER=luce | ||
- POSTGRES_DB=lucedb | ||
# Ganache config | ||
- GANACHE_PORT=8545 | ||
# Ideally the users/password should be defined here | ||
# And automatically added to the database at start | ||
- [email protected] | ||
- PROVIDER_PASSWORD=provider | ||
- [email protected] | ||
- REQUESTER_PASSWORD=requester | ||
|
||
ganache_db: | ||
image: trufflesuite/ganache:v7.7.3 | ||
restart: unless-stopped | ||
|
@@ -39,38 +73,6 @@ services: | |
ports: | ||
- 8888:8888 | ||
|
||
luce_server: | ||
build: . | ||
# image: vjaiman/luce | ||
depends_on: | ||
- postgres_db | ||
- ganache_db | ||
# ports: | ||
# - 8000:8000 | ||
restart: unless-stopped | ||
# entrypoint: tail -f /dev/null | ||
volumes: | ||
- ./:/luce | ||
environment: | ||
- JUPYTER_TOKEN=luce | ||
# Nginx reverse proxy | ||
- VIRTUAL_PORT=8000 | ||
- VIRTUAL_HOST=luce.137.120.31.102.nip.io | ||
- LETSENCRYPT_HOST=luce.137.120.31.102.nip.io | ||
# PostgreSQL config | ||
- DJANGO_USE_PSQL=true | ||
- POSTGRES_PASSWORD=luce123456 | ||
- POSTGRES_USER=luce | ||
- POSTGRES_DB=lucedb | ||
# Ganache config | ||
- GANACHE_PORT=8545 | ||
# Ideally the users/password should be defined here | ||
# And automatically added to the database at start | ||
- [email protected] | ||
- PROVIDER_PASSWORD=provider | ||
- [email protected] | ||
- REQUESTER_PASSWORD=requester | ||
|
||
# jupyterlab: | ||
# # image: jupyter/base-notebook | ||
# build: ./luce_vm/jupyter | ||
|
This file was deleted.
Oops, something went wrong.
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,10 @@ | ||
eth-brownie | ||
Django ==4.1.12 | ||
django-filter | ||
django-extensions | ||
djangorestframework | ||
django-cors-headers | ||
psycopg2 | ||
matplotlib | ||
django-haystack | ||
Sphinx |