Browse Source

docker-compose added

master
barry 6 years ago
parent
commit
e9ebe9071c
4 changed files with 35 additions and 3 deletions
  1. 4
      docker/portal-srv/build.sh
  2. 3
      src/portal-srv/package.json
  3. 0
      srv/conf/dnsmasq.conf
  4. 31
      srv/docker-compose.yml

build_docker_portal-srv.sh → docker/portal-srv/build.sh

@ -16,13 +16,13 @@ git clone "ssh://gitolite@tuleap.pxcom.aero/pxcom-servers/PXPortal.git" || exit
cd $ROOT_REL_PATH
# retrieve version number
numVersion=$(cat ./src/package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]')
numVersion=$(cat ./src/portal-srv/package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]')
echo $TEMPDIR/$ROOT_REL_PATH
echo "The current PXPortal service version is "$numVersion
read -p "Continue? " dummy
docker build --rm -f Dockerfile -t registry.preprod.pxcom.aero/pxcom-servers/pxportal-srv:$numVersion .
docker build --rm -f ./docker/portal-srv/Dockerfile -t registry.preprod.pxcom.aero/pxcom-servers/pxportal-srv:$numVersion .
docker tag registry.preprod.pxcom.aero/pxcom-servers/pxportal-srv:$numVersion registry.preprod.pxcom.aero/pxcom-servers/pxportal-srv:latest
cd ..

3
src/portal-srv/package.json

@ -10,7 +10,8 @@
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"build": "cd ../..; ./docker/portal-srv/build.sh"
},
"author": "P.BARRY",
"license": "ISC"

0
srv/conf/dnsmasq.conf

31
srv/docker-compose.yml

@ -0,0 +1,31 @@
version: '3'
services:
nginx:
image: nginx
container_name: pxportal_nginx
networks:
- pxportal
volumes:
- ./conf/nginx.conf:/etc/nginx/nginx.conf
dnsmasq:
image: andyshinn/dnsmasq
ports:
- "53:53/tcp"
- "53:53/udp"
cap_add:
- NET_ADMIN
volumes:
- ./conf/dnsmasq.conf:/etc/dnsmasq.conf
- ./conf/dnsmasq.d:/etc/dnsmasq.d
exporter:
container_name: pxportal_service
image: registry.preprod.pxcom.aero/pxcom-servers/pxportal-srv:latest
networks:
- pxportal
networks:
pxportal:
driver: bridge
Loading…
Cancel
Save