-
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.
- Loading branch information
Showing
7 changed files
with
104 additions
and
5 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
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,12 @@ | ||
from .base import Node | ||
|
||
|
||
class Webui(Node): | ||
def __init__(self, name, ctx): | ||
super().__init__(name, ctx) | ||
|
||
self._cli = None | ||
self.api = None | ||
|
||
def status(self): | ||
return "Ready" |
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,14 @@ | ||
FROM node:14-alpine3.11 as builder | ||
ARG REPO=ExchangeUnion/xud-webui-poc | ||
ARG BRANCH=master | ||
RUN apk --no-cache add git | ||
RUN git clone -b $BRANCH https://github.com/$REPO /src | ||
WORKDIR /src | ||
RUN git pull origin $BRANCH | ||
RUN yarn install | ||
RUN yarn build | ||
|
||
FROM nginx:1.19.0-alpine | ||
COPY --from=builder /src/build/ /usr/share/nginx/html | ||
COPY nginx.conf /etc/nginx/nginx.conf | ||
RUN mkdir -p /var/nginx/logs |
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,41 @@ | ||
worker_processes 1; ## Default: 1 | ||
error_log /var/nginx/logs/error.log; | ||
pid /var/nginx/logs/nginx.pid; | ||
worker_rlimit_nofile 8192; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
include mime.types; | ||
index index.html; | ||
|
||
default_type application/octet-stream; | ||
log_format main '$remote_addr - $remote_user [$time_local] $status ' | ||
'"$request" $body_bytes_sent "$http_referer" ' | ||
'"$http_user_agent" "$http_x_forwarded_for"'; | ||
access_log /var/nginx/logs/access.log main; | ||
sendfile on; | ||
tcp_nopush on; | ||
|
||
server { | ||
listen 8080; | ||
server_name localhost; | ||
root /usr/share/nginx/html; | ||
|
||
location /static/ { | ||
} | ||
|
||
location /api { | ||
proxy_pass http://xud:8080/api; | ||
} | ||
|
||
location ~ \.css { | ||
add_header Content-Type text/css; | ||
} | ||
location ~ \.js { | ||
add_header Content-Type application/x-javascript; | ||
} | ||
} | ||
} |
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