Added port environment var set and removed unneded files
This commit is contained in:
parent
cb02a1fdc6
commit
788e0694d8
@ -4,7 +4,7 @@ WORKDIR /app
|
|||||||
|
|
||||||
COPY . /app
|
COPY . /app
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE $PORT
|
||||||
|
|
||||||
RUN apt update -y && apt install make clang -y
|
RUN apt update -y && apt install make clang -y
|
||||||
|
|
||||||
|
28
bin/compile
28
bin/compile
@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# bin/compile <build-dir> <cache-dir>
|
|
||||||
|
|
||||||
set -e
|
|
||||||
set -o pipefail
|
|
||||||
|
|
||||||
BUILD_DIR=$1
|
|
||||||
CACHE_DIR=$2
|
|
||||||
|
|
||||||
function indent() {
|
|
||||||
c='s/^/ /'
|
|
||||||
case $(uname) in
|
|
||||||
Darwin) sed -l "$c";;
|
|
||||||
*) sed -u "$c";;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
cd $BUILD_DIR
|
|
||||||
|
|
||||||
# configure
|
|
||||||
if [ -f configure ]; then
|
|
||||||
echo "-----> Configuring"
|
|
||||||
./configure 2>&1 | indent
|
|
||||||
fi
|
|
||||||
|
|
||||||
# make
|
|
||||||
echo "-----> Compiling with Make"
|
|
||||||
make 2>&1 | indent
|
|
@ -1,8 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# bin/detect <build-dir>
|
|
||||||
|
|
||||||
if [[ -f $1/Makefile ]]; then
|
|
||||||
echo "C" && exit 0
|
|
||||||
else
|
|
||||||
echo "no" && exit 1
|
|
||||||
fi
|
|
@ -1,4 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# bin/release <build-dir>
|
|
||||||
|
|
||||||
echo "--- {}"
|
|
@ -6,10 +6,8 @@ services:
|
|||||||
container_name: c-dmitriy
|
container_name: c-dmitriy
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
build: .
|
build: .
|
||||||
environment:
|
|
||||||
- PORT=8080
|
|
||||||
expose:
|
expose:
|
||||||
- 8080
|
- $PORT
|
||||||
command: ./build/server 8080
|
command: ./build/server $PORT
|
||||||
networks:
|
networks:
|
||||||
- web
|
- web
|
||||||
|
Loading…
x
Reference in New Issue
Block a user