Comments (5)
By the way why is there double slashes after rweb:9000 in services.conf?
from docker-svn.
Can individual containers be resolved by name in Kubernetes pods? The most elegant solution to this issue would be that svn:80 and rweb:9000 works in both docker-compose and kube.
from docker-svn.
Using this workaround in a downstream dockerfile specifically for kubernetes:
RUN sed -i 's|fcgi://rweb:9000|fcgi://127.0.0.1:9000|' conf/svn/rweb/services-fpm.conf \
&& sed -i 's|fcgi://rweb:9000|fcgi://127.0.0.1:9000|' conf/svn/rweb/load-fpm.conf
The RWEB_SVC
variable i conf/svn/rweb/services-fpm.conf is no solution because ProxyPassMatch doesn't support variables. Maybe if we use rewrite there too. Name resolution would be more elegant though.
from docker-svn.
Improved the workaround so that it can work with regular docker, given a named link.
diff --git a/build-contracts/docker-compose.yml b/build-contracts/docker-compose.yml
index ea08931..2244d33 100644
--- a/build-contracts/docker-compose.yml
+++ b/build-contracts/docker-compose.yml
@@ -9,6 +9,8 @@ services:
environment:
- DEBUG=true
- REPOS_SVC=fcgi://rweb:9000/opt/rweb
+ links:
+ - rweb:svn
rweb:
image: solsson/rweb:latest
expose:
diff --git a/rweb-svn/Dockerfile b/rweb-svn/Dockerfile
index e77ba2b..6338dad 100644
--- a/rweb-svn/Dockerfile
+++ b/rweb-svn/Dockerfile
@@ -7,5 +7,5 @@ ADD leansetup /usr/local/bin/
RUN sed -i 's/set -e/set -e\n\nleansetup/' /usr/local/bin/httpd-foreground
# fix multi-container pod issue "DNS lookup failure for: rweb"
-RUN sed -i 's|fcgi://rweb:9000|fcgi://127.0.0.1:9000|' conf/svn/rweb/services-fpm.conf \
- && sed -i 's|fcgi://rweb:9000|fcgi://127.0.0.1:9000|' conf/svn/rweb/load-fpm.conf
+RUN sed -i 's|fcgi://rweb:9000|fcgi://svn:9000|' conf/svn/rweb/services-fpm.conf \
+ && sed -i 's|fcgi://rweb:9000|fcgi://svn:9000|' conf/svn/rweb/load-fpm.conf
As the commit comment says I also tried the name _rweb._tcp.svn
(see http://kubernetes.io/docs/admin/dns/#srv-records) but got DNS lookup failure for: _rweb._tcp.svn
. I'm guessing that apache's name lookup doesn't support this dns extension.
from docker-svn.
I don't know what commit I'm referring to above, but now I realize that this isn't a problem with the docker image. Instead, in kubernetes, add a headless service rweb
alongside your svn
service, and the internal proxy httpd->fpm will work just like in docker-compose. For example, with the same selector app: svn
that the service uses:
apiVersion: v1
kind: Service
metadata:
name: rweb
spec:
clusterIP: None
selector:
app: svn
ports:
- port: 9000
targetPort: 9000
For more info see: https://kubernetes.io/docs/user-guide/services/#headless-services
from docker-svn.
Related Issues (6)
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 docker-svn.