add docker registry
This commit is contained in:
@@ -201,7 +201,7 @@ window.appMessages["en-US"] = {
|
||||
"private.dash.dash":"Account data",
|
||||
"private.dash.urlaccount":"Account URL",
|
||||
"private.dash.urltrusted":"Trusted URL",
|
||||
"private.dash.docs":"Documentation",
|
||||
"private.dash.docs":"Links",
|
||||
"private.dash.account.data":"Account data",
|
||||
"private.dash.address":"Bitcoin address",
|
||||
"private.dash.bitmessages":"Bitmessage address",
|
||||
|
||||
@@ -201,7 +201,7 @@ window.appMessages["ru-RU"] = {
|
||||
"private.dash.dash":"Данные аккаунта",
|
||||
"private.dash.urlaccount":"URL Аккаунта",
|
||||
"private.dash.urltrusted":"Доверенные URL",
|
||||
"private.dash.docs":"Документация",
|
||||
"private.dash.docs":"Ссылки",
|
||||
"private.dash.account.data":"Данные аккаунта",
|
||||
"private.dash.address":"Bitcoin адрес",
|
||||
"private.dash.bitmessages":"Bitmessage адрес",
|
||||
|
||||
12
docker-compose.yml
Normal file
12
docker-compose.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
services:
|
||||
nginx:
|
||||
build:
|
||||
context: https://git.bitdeals.org/private/web-build.git
|
||||
dockerfile: ./docker/Dockerfile
|
||||
image: registry.bitdeals.org:5000/web-build
|
||||
environment:
|
||||
- BD_FORWEB=http://127.0.0.1:80
|
||||
- BD_WEB_LANG=en
|
||||
expose:
|
||||
- "80"
|
||||
|
||||
50
docker/Dockerfile
Normal file
50
docker/Dockerfile
Normal file
@@ -0,0 +1,50 @@
|
||||
## syntax=docker/dockerfile:3
|
||||
|
||||
FROM bitnami/nginx:1.22-debian-11
|
||||
|
||||
SHELL ["/bin/bash", "-eux", "-c"]
|
||||
|
||||
LABEL name="BitDeals WebUI"
|
||||
EXPOSE 80/tcp
|
||||
|
||||
## Debian update; install dependencies
|
||||
ARG DEBIAN_FRONTEND=noninteractive \
|
||||
DEBCONF_NOWARNINGS="yes"
|
||||
|
||||
USER root
|
||||
|
||||
RUN apt-get update -y ; \
|
||||
apt-get upgrade -y ; \
|
||||
apt-get -y install --no-install-recommends locales tzdata moreutils ; \
|
||||
apt-get clean ; \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
COPY --chown=www-data:www-data ./build .
|
||||
COPY ./docker/nginx.conf /opt/bitnami/nginx/conf/server_blocks/nginx.conf
|
||||
|
||||
ENV WEB_CONF_FILE="/app/config.js"
|
||||
ENV BD_FORWEB="http://127.0.0.1:80"
|
||||
ENV BD_WEB_LANG="en"
|
||||
|
||||
SHELL ["/bin/bash", "-eu", "-c"]
|
||||
|
||||
# Change default variables in config file
|
||||
RUN sed -i -e "/creditsText:/ s/20../$(date +%Y)/" \
|
||||
-e 's/confAuthorize:.*/confAuthorize: true,/' \
|
||||
-e 's/dmHost:.*/dmHost: "http:\/\/0.0.0.0:4999",/' \
|
||||
-e 's/confPrivateDash:.*/confPrivateDash: true,/' \
|
||||
-e 's/confDealModule:.*/confDealModule: false,/' \
|
||||
-e 's/confAdmin:.*/confAdmin: true,/' $WEB_CONF_FILE
|
||||
|
||||
RUN chmod 666 $WEB_CONF_FILE
|
||||
USER 1001
|
||||
|
||||
# Confugure BitDeals WebUI
|
||||
CMD cat $WEB_CONF_FILE | \
|
||||
sed -e "s|defaultLanguage:.*|defaultLanguage: \"$BD_WEB_LANG\",|" \
|
||||
-e "s|apiTokenUrl:.*|apiTokenUrl: \"$BD_FORWEB/oauth2/token\",|" \
|
||||
-e "s|apiDomain:.*|apiDomain: \"$BD_FORWEB\",|" \
|
||||
-e "s|wsDomain:.*|wsDomain: \"wss://$(basename $BD_FORWEB)\",|" | \
|
||||
sponge $WEB_CONF_FILE ;\
|
||||
/opt/bitnami/scripts/nginx/run.sh
|
||||
|
||||
78
docker/nginx.conf
Normal file
78
docker/nginx.conf
Normal file
@@ -0,0 +1,78 @@
|
||||
server {
|
||||
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
index index.html;
|
||||
|
||||
server_name _;
|
||||
|
||||
location ^~ /docs/ {
|
||||
proxy_pass http://bitdeals:4977;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Connection "close";
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
location ^~ /oauth2/ {
|
||||
proxy_pass http://bitdeals:4977;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Connection "close";
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
location ^~ /oauth/ {
|
||||
proxy_pass http://bitdeals:4977;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Connection "close";
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
location ^~ /api/ {
|
||||
proxy_pass http://bitdeals:4977;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Connection "close";
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
location ^~ /ws/ {
|
||||
proxy_pass http://bitdeals:4977;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Connection "close";
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
location ^~ /session/ {
|
||||
proxy_pass http://bitdeals:4977;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_read_timeout 86400;
|
||||
}
|
||||
|
||||
location / {
|
||||
root /app;
|
||||
index index.html;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user