Skip to content

Commit

Permalink
Fix sol contract installation in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
vemonet committed Feb 14, 2024
1 parent 4c3be0c commit 26b32be
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 21 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN pip install eth-brownie
RUN pip install Django==4.1.12
RUN pip install django-filter
RUN pip install django-extensions
RUN pip3 install djangorestframework
RUN pip install djangorestframework
RUN pip install django-cors-headers
RUN pip install psycopg2
RUN pip install matplotlib
Expand All @@ -29,6 +29,8 @@ RUN pip install Sphinx

# RUN pip install -r requirements.txt

RUN brownie pm install OpenZeppelin/openzeppelin-contracts@4.8.0

COPY luce_vm/scripts/entrypoint.sh /entrypoint.sh
RUN chmod 744 /entrypoint.sh

Expand Down
27 changes: 14 additions & 13 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ services:
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
# ports:
# - 8545:8545
environment:
- VIRTUAL_PORT=8545
- VIRTUAL_HOST=ganache.luce.137.120.31.102.nip.io
Expand All @@ -18,15 +18,15 @@ services:
postgres_db:
image: postgres
restart: unless-stopped
depends_on:
depends_on:
- ganache_db
ports:
- 5432:5432
# ports:
# - 5432:5432
environment:
- POSTGRES_PASSWORD=luce
- POSTGRES_USER=vagrant
- POSTGRES_PASSWORD=luce123456
- POSTGRES_USER=luce
- POSTGRES_DB=lucedb
volumes:
volumes:
- ${STORAGE_PATH:-./data}/postgres_db:/var/lib/postgresql/data
- ./luce_vm/scripts/init_postgres.sh:/docker-entrypoint-initdb.d/init_postgres.sh

Expand All @@ -38,12 +38,13 @@ services:
luce_server:
build: .
# image: vjaiman/luce
depends_on:
depends_on:
- postgres_db
- ganache_db
ports:
- 8000:8000
# ports:
# - 8000:8000
restart: unless-stopped
# entrypoint: tail -f /dev/null
volumes:
- ./:/luce
environment:
Expand All @@ -54,8 +55,8 @@ services:
- LETSENCRYPT_HOST=luce.137.120.31.102.nip.io
# PostgreSQL config
- DJANGO_USE_PSQL=true
- POSTGRES_PASSWORD=luce
- POSTGRES_USER=vagrant
- POSTGRES_PASSWORD=luce123456
- POSTGRES_USER=luce
- POSTGRES_DB=lucedb
# Ganache config
- GANACHE_PORT=8545
Expand Down
3 changes: 2 additions & 1 deletion luce_vm/luce_django/luce/lucehome/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@
'NAME': 'lucedb',
'USER': 'luce',
'PASSWORD': 'luce123456',
'HOST': 'localhost',
'HOST': 'postgres_db',
# 'HOST': 'localhost',
'PORT': '5433',
}
}
Expand Down
4 changes: 2 additions & 2 deletions luce_vm/luce_django/luce/lucehome/settings_psql.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'lucedb',
'USER': 'vagrant',
'PASSWORD': 'luce',
'USER': 'luce',
'PASSWORD': 'luce123456',
'HOST': 'postgres_db',
'PORT': '5432',
}
Expand Down
8 changes: 4 additions & 4 deletions luce_vm/scripts/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

http = urllib3.PoolManager()

registration_data = {
registration_data = {
"last_name":"piccini",
"email":"email90@email.com",
"password":"password123",
Expand Down Expand Up @@ -39,8 +39,8 @@ def Login(url, user):
registration_url = "http://localhost:8000/user/register/"
def Register(registration_url, registration_data):
r = http.request(
'POST',
registration_url,
'POST',
registration_url,
body=json.dumps(registration_data).encode('utf-8'),
headers={
'Content-Type':'application/json'
Expand All @@ -57,7 +57,7 @@ def Register(registration_url, registration_data):
token = Login(url, user)
# print(token)

uploaded_data = {
uploaded_data = {
"estimate":False,
"description":"ds",
"link":"http://link.com",
Expand Down

0 comments on commit 26b32be

Please sign in to comment.