Fit for daphne + gunicorn. Docker default command runs dev node.

This commit is contained in:
Reckless_Satoshi 2022-02-10 11:28:59 -08:00
parent 7284fb3480
commit 4a16f7debd
No known key found for this signature in database
GPG Key ID: 9C4585B561315571
7 changed files with 31 additions and 26 deletions

View File

@ -23,7 +23,7 @@ HOST_NAME = ''
ONION_LOCATION = '' ONION_LOCATION = ''
# Link to robosats mainnet/testnet (shown on frontend in statsfornerds so users can switch mainnet/testnet) # Link to robosats mainnet/testnet (shown on frontend in statsfornerds so users can switch mainnet/testnet)
THE_OTHER_ROBOSATS = 'robosats-testnet/mainnet.onion' THE_OTHER_ROBOSATS = 'testnet/mainnet.onion'
# Lightning node open info, url to amboss and 1ML # Lightning node open info, url to amboss and 1ML
AMBOSS = '' AMBOSS = ''

View File

@ -30,4 +30,4 @@ RUN sed -i 's/^import .*_pb2 as/from . \0/' api/lightning/invoices_pb2_grpc.py
EXPOSE 8000 EXPOSE 8000
CMD ["gunicorn", "--bind", ":8000", "robosats.wsgi:application"] CMD ["python3", "manage.py", "runserver", "0.0.0.0:8000]

View File

@ -1,7 +1,7 @@
version: '3.9' version: '3.9'
services: services:
redis: redis:
image: sickp/alpine-redis:3.2.2 image: redis:6.2.6
container_name: redis container_name: redis
restart: always restart: always
volumes: volumes:
@ -22,7 +22,6 @@ services:
- .:/usr/src/robosats - .:/usr/src/robosats
- /mnt/development/database:/usr/src/database - /mnt/development/database:/usr/src/database
- /mnt/development/lnd:/lnd - /mnt/development/lnd:/lnd
command: python3 manage.py runserver 0.0.0.0:8000
network_mode: service:tor network_mode: service:tor
frontend: frontend:
@ -57,7 +56,7 @@ services:
celery: celery:
build: . build: .
container_name: cbeat-dev container_name: cele-dev
restart: always restart: always
command: celery -A robosats worker --beat -l info -S django command: celery -A robosats worker --beat -l info -S django
environment: environment:

View File

@ -57,9 +57,9 @@ export default class OrderPage extends Component {
this.statusToDelay = { this.statusToDelay = {
"0": 2000, //'Waiting for maker bond' "0": 2000, //'Waiting for maker bond'
"1": 25000, //'Public' "1": 25000, //'Public'
"2": 9999999, //'Deleted' "2": 999999, //'Deleted'
"3": 2000, //'Waiting for taker bond' "3": 2000, //'Waiting for taker bond'
"4": 9999999, //'Cancelled' "4": 999999, //'Cancelled'
"5": 999999, //'Expired' "5": 999999, //'Expired'
"6": 3000, //'Waiting for trade collateral and buyer invoice' "6": 3000, //'Waiting for trade collateral and buyer invoice'
"7": 3000, //'Waiting only for seller trade collateral' "7": 3000, //'Waiting only for seller trade collateral'
@ -67,12 +67,13 @@ export default class OrderPage extends Component {
"9": 10000, //'Sending fiat - In chatroom' "9": 10000, //'Sending fiat - In chatroom'
"10": 10000, //'Fiat sent - In chatroom' "10": 10000, //'Fiat sent - In chatroom'
"11": 30000, //'In dispute' "11": 30000, //'In dispute'
"12": 9999999, //'Collaboratively cancelled' "12": 999999, //'Collaboratively cancelled'
"13": 3000, //'Sending satoshis to buyer' "13": 3000, //'Sending satoshis to buyer'
"14": 9999999, //'Sucessful trade' "14": 999999, //'Sucessful trade'
"15": 10000, //'Failed lightning network routing' "15": 10000, //'Failed lightning network routing'
"16": 9999999, //'Maker lost dispute' "16": 180000, //'Wait for dispute resolution'
"17": 9999999, //'Taker lost dispute' "17": 180000, //'Maker lost dispute'
"18": 180000, //'Taker lost dispute'
} }
} }

File diff suppressed because one or more lines are too long

View File

@ -8,9 +8,11 @@ https://docs.djangoproject.com/en/4.0/howto/deployment/asgi/
""" """
import os import os
import django
from channels.routing import get_default_application
from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tabulator.settings')
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'robosats.settings') django.setup()
application = get_asgi_application() application = get_default_application()

View File

@ -20,6 +20,9 @@ Then monitor in a terminal the Django dev docker service
And the NPM dev docker service And the NPM dev docker service
`docker attach npm-dev` `docker attach npm-dev`
You could also just check all services logs
`docker-compose logs -f`
Ready to roll! But maybe you also are interested on these: Ready to roll! But maybe you also are interested on these:
Unlock or 'create' the lnd node Unlock or 'create' the lnd node