added forking

This commit is contained in:
Pin
2022-02-21 20:59:44 -05:00
parent 2f73f776f6
commit 16801086ff
6 changed files with 213 additions and 64 deletions

View File

@@ -5,13 +5,13 @@ OUTPUT = -o ${OUTPUT_DIR}/PROG
INSTALL_OUTPUT = ${OUTPUT_DIR}/PROG
build: output_dir
gcc -Wall ${LIBRARIES} ${SOURCES} ${OUTPUT:PROG=seaweb}
gcc -Wall ${SOURCES} ${OUTPUT:PROG=seaweb} ${LIBRARIES}
debug: output_dir
gcc -Wall -g ${LIBRARIES} ${SOURCES} ${OUTPUT:PROG=seaweb}
gcc -Wall -g ${SOURCES} ${OUTPUT:PROG=seaweb} ${LIBRARIES}
install:
mv ${INSTALL_OUTPUT:PROG=server} /usr/bin/
mv ${INSTALL_OUTPUT:PROG=seaweb} /usr/bin/
output_dir:
mkdir -p ${OUTPUT_DIR}
@@ -36,3 +36,11 @@ genCerts:
-rand_serial -config ./ca/ca.cnf \
-out ./certs/cert.pem -infiles ./certs/cert.csr
dockerBuild: output_dir
docker build . -t seaweb:latest
dockerTestDeploy: dockerBuild
docker run -p8080:8080 --rm seaweb:latest seaweb &
killTestDocker:
docker stop -t 0 `docker ps | grep "seaweb:latest" | tail -n 1 | tr -s " " | cut -d " " -f 1`