Added port environment var set and removed unneded files

This commit is contained in:
Dmitriy Shishkov 2021-03-15 18:45:33 +05:00
parent cb02a1fdc6
commit 788e0694d8
No known key found for this signature in database
GPG Key ID: 7CAE12ED13853CAC
5 changed files with 3 additions and 45 deletions

View File

@ -4,7 +4,7 @@ WORKDIR /app
COPY . /app
EXPOSE 8080
EXPOSE $PORT
RUN apt update -y && apt install make clang -y

View File

@ -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

View File

@ -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

View File

@ -1,4 +0,0 @@
#!/usr/bin/env bash
# bin/release <build-dir>
echo "--- {}"

View File

@ -6,10 +6,8 @@ services:
container_name: c-dmitriy
restart: unless-stopped
build: .
environment:
- PORT=8080
expose:
- 8080
command: ./build/server 8080
- $PORT
command: ./build/server $PORT
networks:
- web