Move docker files in subdir
This commit is contained in:
@@ -7,6 +7,8 @@ RUN apt-get install -y build-essential rsync
|
||||
RUN npm i
|
||||
RUN npm run build
|
||||
|
||||
RUN mv ./docker/* .
|
||||
|
||||
FROM nginx:1.17.8-alpine
|
||||
|
||||
WORKDIR /patch
|
||||
@@ -14,8 +16,8 @@ WORKDIR /patch
|
||||
COPY --from=builder /build/entrypoint.sh .
|
||||
COPY --from=builder /build/wait-for .
|
||||
COPY --from=builder /build/dist/mempool /var/www/mempool
|
||||
COPY --from=builder /build/nginx-docker.conf /etc/nginx/nginx.conf
|
||||
COPY --from=builder /build/nginx-mempool-docker.conf /etc/nginx/conf.d/nginx-mempool.conf
|
||||
COPY --from=builder /build/nginx.conf /etc/nginx/
|
||||
COPY --from=builder /build/nginx-mempool.conf /etc/nginx/conf.d/
|
||||
|
||||
RUN chmod +x /patch/entrypoint.sh
|
||||
RUN chmod +x /patch/wait-for
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/bin/sh
|
||||
__MEMPOOL_BACKEND_MAINNET_HTTP_HOST__=${BACKEND_MAINNET_HTTP_HOST:=127.0.0.1}
|
||||
__MEMPOOL_BACKEND_MAINNET_HTTP_PORT__=${BACKEND_MAINNET_HTTP_PORT:=8999}
|
||||
|
||||
sed -i "s/__MEMPOOL_BACKEND_MAINNET_HTTP_HOST__/${__MEMPOOL_BACKEND_MAINNET_HTTP_HOST__}/g" /etc/nginx/conf.d/nginx-mempool.conf
|
||||
sed -i "s/__MEMPOOL_BACKEND_MAINNET_HTTP_PORT__/${__MEMPOOL_BACKEND_MAINNET_HTTP_PORT__}/g" /etc/nginx/conf.d/nginx-mempool.conf
|
||||
|
||||
exec "$@"
|
||||
@@ -41,21 +41,21 @@
|
||||
proxy_pass https://mempool.space;
|
||||
}
|
||||
location /api/v1/ws {
|
||||
proxy_pass http://__MEMPOOL_BACKEND_MAINNET_HTTP_HOST__:8999/;
|
||||
proxy_pass http://__MEMPOOL_BACKEND_MAINNET_HTTP_HOST__:__MEMPOOL_BACKEND_MAINNET_HTTP_PORT__/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
}
|
||||
location /api/v1 {
|
||||
proxy_pass http://__MEMPOOL_BACKEND_MAINNET_HTTP_HOST__:8999/api/v1;
|
||||
proxy_pass http://__MEMPOOL_BACKEND_MAINNET_HTTP_HOST__:__MEMPOOL_BACKEND_MAINNET_HTTP_PORT__/api/v1;
|
||||
}
|
||||
location /api/ {
|
||||
proxy_pass http://__MEMPOOL_BACKEND_MAINNET_HTTP_HOST__:8999/api/v1/;
|
||||
proxy_pass http://__MEMPOOL_BACKEND_MAINNET_HTTP_HOST__:__MEMPOOL_BACKEND_MAINNET_HTTP_PORT__/api/v1/;
|
||||
}
|
||||
|
||||
# mainnet API
|
||||
location /ws {
|
||||
proxy_pass http://__MEMPOOL_BACKEND_MAINNET_HTTP_HOST__:8999/;
|
||||
proxy_pass http://__MEMPOOL_BACKEND_MAINNET_HTTP_HOST__:__MEMPOOL_BACKEND_MAINNET_HTTP_PORT__/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
Reference in New Issue
Block a user