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: Send invitation causes "Cannot read properties of undefined (reading 'replace')"
- GeoData columns type missing HOT 2
- 🐛 Bug: no access to bulk update HOT 1
- 🐛 Bug: meta sync doesn't identify change in table name HOT 1
- 🐛 Bug: [mobile] Cell data not displayed in shared view HOT 3
- 🐛 Bug: Using a Different Postgres Schema Breaks Table Renaming
- 🐛 Bug: lookup columns is missing after source table copied HOT 4
- 🐛 Bug: Broken styles for mobile layout HOT 5
- 🐛 Bug: File preview images do not display. HOT 2
- 🐛 Bug: Cannot connect to Google Cloud Storage
- Feature : Is there a way to expose a Calendar view as a iCal file? HOT 1
- 🐛 Bug: avoid suffixing field names on duplicate table & base
- 🐛 Bug: Views (join query generated) from a external source result in Errors HOT 2
- 🔦 Feature: Import iCal /.ics / online calendar as data source HOT 2
- 🐛 Bug: Persistence not backing up to S3 on latest version of Noco HOT 6
- 🔦 Feature: Access Record URL in Public Base/View without Sign-In HOT 1
- 🐛 Bug: Unexpected Error HOT 2
- 🔦 Feature: Display M2M Tables name near every m2m relationship HOT 2
- 🔦 Feature: Allow to use SSL parameters in NC_DB (MySQL / PostgreSQL / MSSQL)
- 🐛 Bug: Router Resolver Issues with all Docker Installs HOT 2
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.