tests and docker ports diffs

This commit is contained in:
Olof hagsand 2020-10-04 16:06:55 +02:00
parent 4d91bcd810
commit b7cb2e2526
5 changed files with 22 additions and 16 deletions

View file

@ -121,7 +121,8 @@ RUN apk add --update openssl libevent
RUN apk add --update sudo curl procps grep make bash
# Expose https port for restconf
EXPOSE 80
EXPOSE 80/tcp
EXPOSE 443/tcp
# Create clicon user and group
RUN adduser -D -H clicon

View file

@ -74,7 +74,7 @@ push:
# Start the clixon system container and run the test script
# Note tests will kill the daemons started in the start scrips
test: docker
./cleanup.sh ; PORT=8080 ./start.sh # kill (ignore error) and the start it
./cleanup.sh ; ./start.sh # kill (ignore error) and the start it
sudo docker exec -t clixon-system bash -c 'cd /usr/local/bin/test && ./all.sh'
depend:

View file

@ -51,7 +51,9 @@ err(){
DBG=${DBG:-0}
# Expose other host port than port 80
PORT=${PORT:-80}
PORT=${PORT:-8080}
SPORT=${SPORT:-8443}
# Initial running datastore content (other than empty)
STORE=${STORE:-}
@ -84,7 +86,7 @@ CONFIG=${CONFIG:-$CONFIG0}
# Start clixon-example backend
>&2 echo -n "Starting Backend..."
sudo docker run -p $PORT:80 --name clixon-system --rm -e DBG=$DBG -e CONFIG="$CONFIG" -e STORE="$STORE" -td clixon/clixon-system || err "Error starting clixon-system"
sudo docker run -p $PORT:80 -p $SPORT:443 --name clixon-system --rm -e DBG=$DBG -e CONFIG="$CONFIG" -e STORE="$STORE" -td clixon/clixon-system || err "Error starting clixon-system"
>&2 echo "clixon-system started"