Comments (6)
I've updated the docker image (dockerfile) but haven't pushed it yet.
But let me look into this
from nocodb.
-e VIRTUAL_HOST=api.example.com \ -e VIRTUAL_PORT=3000 \
The xmysql Dockerfile don't know this environment variables.
But nevermind, the docker log xmysql
output looks good. The fact that it doesn't response is that I apply new version of xmysql without update the docker-entrypoint.sh
file. xmysql is only listen on localhost by default, so it will run inside the docker container and did nothing.
diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh
index 84a52ca..7c00d20 100755
--- a/docker-entrypoint.sh
+++ b/docker-entrypoint.sh
@@ -1,3 +1,3 @@
#!/bin/sh
cd /usr/src/app/
-node index.js -h $DATABASE_HOST -p $DATABASE_PASSWORD -d $DATABASE_NAME -u $DATABASE_USER
\ No newline at end of file
+node index.js -h $DATABASE_HOST -p $DATABASE_PASSWORD -d $DATABASE_NAME -u $DATABASE_USER -n 80 -r 0.0.0.0
The image is already pushed, so you just need to pull and it sould be run. But take care, I've changed the local docker port to 80. So you need to publish -p 3000:80
. The benefit is, that you can address xmysql in your other services just with http://xmysql
, that's it.
So yes, point taken. we need docker versions which follows xmysql versions. I'll prepare a new merge request with all changes and documentation update.
Here is an minimal example with nginx proxy
1st create nginx.conf
there is no need for upstream the xmysql host.
when you need load balancing, just use docker swarm mode
and docker service create --name xmysql --replicas 10 ...
echo '
events {
worker_connections 1024;
}
http {
server {
server_name api.example.com 127.0.0.1;
listen 80 ;
location / {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://xmysql;
}
}
}
' > /tmp/nginx.conf
2nd create a docker network
make sure you've created a docker network
docker network create local_dev
3rd deploy xmysql
use local_dev
network, so other container can reached xmysql by it's name xmysql
(the --name
value). no need to use ip address in other containers.
we published port 3000 on host system for debugging. internaly the image use now port 80, because then you can easily use wget http://xmysql/
docker run -d \
--network local_dev
--name xmysql
--p 3000:80
-e DATABASE_HOST=example-blog-db-mysql \
-e DATABASE_USER=root \
-e DATABASE_PASSWORD=fab14france \
-e DATABASE_NAME=wordpress \
markuman/xmysql
now check you browser on 127.0.0.1:3000
. When not, deploying nginx will fail because the upstream host is not reachable.
4th deploy nginx
docker run -d \
--network local_dev \
--name nginx \
-p 80:80 \
-v /tmp/nginx.conf:/etc/nginx/nginx.conf \
nginx:alpine
from nocodb.
@markuman : Can you please take a look at this.
from nocodb.
These stackoverflow questions might be of help.
from nocodb.
@markuman : well made instructions mate π π
from nocodb.
@pavelsr : I hope @markuman 's changes should help resolve with nginx-proxy now. I'll be closing this issue eod. Feel free to reopen if needed.
@markuman - capturing details above of configuring nginx proxy would be useful in documentation ? Could you please help make a pull request to Readme.md. Thank you.
from nocodb.
Related Issues (20)
- π Bug: RedisCacheMgr.set Cannot convert object to primitive value HOT 4
- π Bug: grid view groupby pagination layout is shifting to left side when pagination is loading
- π Bug: Cannot search by email when user renamed the account. HOT 1
- π¦ Feature: The privilege of "switch Language" should be controlled.
- π¦ Feature: The size of the Attachment should be controlled.
- π¦ Feature: Add notice that cloud instance doesn't support exports yet
- π¦ Feature: see photos of other team members that have the same database open
- π¦ Feature: negative rating values
- π Bug: Adding attachment leads to error "Cannot set properties of null (setting 'Sortable1713167698240')". HOT 1
- π¦ Feature: Allowing users signing up to be Organization Level Creators without administrator action
- π¦ Feature: Database audit and log size should be limit or split.
- π¦ Feature: "Recycle bin" or "Clean up" feature for base deleting
- [Feature] Set the number of items per page HOT 2
- π Bug: Webhooks when used on a Docker container behind a proxy don't work
- Add restful/graphql api for the tables of datasource HOT 1
- π Bug: Grid view field header context menu and field edit modal visible at same time
- π Bug: Error when selecting linked field in form view HOT 1
- π¦ Feature: Open file in attachment in the browser like we do for images HOT 1
- π Bug: An βRecord N not foundβ exception throws when deleting in the grid view with groupby.
- π Bug: Kanban drag drop issue HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nocodb.