Merge pull request #1861 from RoboSats/add-docker-frontend

Add docker frontend
This commit is contained in:
KoalaSat
2025-04-11 14:30:26 +00:00
committed by GitHub
3 changed files with 29 additions and 2 deletions

1
.gitignore vendored
View File

@ -651,6 +651,7 @@ desktopApp/release-builds
# frontend statics
frontend/templates/frontend/*.html
mobile/html/Web.bundle
frontend/*.html
desktopApp/static
desktopApp/*.html
web/static

View File

@ -0,0 +1,22 @@
version: '3.9'
# Frontend and node client development orchestration
name: robosats-frontend
services:
frontend:
build: ./
container_name: dev-frontend
volumes:
- ./:/usr/src/frontend
- ../web:/usr/src/web
nginx:
build: ../web
container_name: dev-nginx
restart: always
volumes:
- ./:/usr/src/frontend
- ../web:/usr/src/web
- ../web/nginx.conf:/etc/nginx/nginx.conf
- ../web/coordinators/:/etc/nginx/conf.d/
ports:
- 8888:80

View File

@ -95,8 +95,12 @@ const getOrigin = (network = 'mainnet'): Origin => {
const host = getHostUrl(network);
let origin: Origin = 'onion';
const [client] = window.RobosatsSettings.split('-');
if (client === 'mobile' || client === 'desktop' || host.includes('.onion')) {
if (
client === 'mobile' ||
client === 'desktop' ||
host.includes('.onion') ||
host.includes(':8888')
) {
origin = 'onion';
} else if (host.includes('i2p')) {
origin = 'i2p';