mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Updated ansible script for docker
This commit is contained in:
committed by
Dan Christian Bogos
parent
6d4a1738fb
commit
ff9046d82f
@@ -1,4 +0,0 @@
|
||||
FROM scratch
|
||||
ADD ./cgr-engine /
|
||||
ADD ./cgrates.json /etc/cgrates/
|
||||
CMD ["/cgr-engine","--logger=*stdout","-httprof_path=/pprof"]
|
||||
@@ -1,9 +0,0 @@
|
||||
|
||||
generate:
|
||||
./build.sh
|
||||
cp ../../conf/cgrates/cgrates.json ./cgrates.json
|
||||
build:
|
||||
docker build -t cgrates .
|
||||
run: build
|
||||
docker run --rm -itv `pwd`:/root/code -p 2080:2080 -p 2012:2012 --name cgr cgrates
|
||||
.PHONY: generate,build,run
|
||||
12
data/docker/scratch/build.sh
Normal file → Executable file
12
data/docker/scratch/build.sh
Normal file → Executable file
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env sh
|
||||
echo "Building CGRateS ..."
|
||||
echo "Static building CGRateS..."
|
||||
|
||||
GIT_LAST_LOG=$(git log -1 | tr -d "'")
|
||||
|
||||
@@ -12,5 +12,13 @@ fi
|
||||
|
||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o cgr-engine -a -ldflags '-extldflags "-f no-PIC -static"' -tags 'osusergo netgo static_build' -ldflags "-X 'github.com/cgrates/cgrates/utils.GitLastLog=$GIT_LAST_LOG'" github.com/cgrates/cgrates/cmd/cgr-engine
|
||||
cr=$?
|
||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o cgr-loader -a -ldflags '-extldflags "-f no-PIC -static"' -tags 'osusergo netgo static_build' -ldflags "-X 'github.com/cgrates/cgrates/utils.GitLastLog=$GIT_LAST_LOG'" github.com/cgrates/cgrates/cmd/cgr-loader
|
||||
cl=$?
|
||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o cgr-console -a -ldflags '-extldflags "-f no-PIC -static"' -tags 'osusergo netgo static_build' -ldflags "-X 'github.com/cgrates/cgrates/utils.GitLastLog=$GIT_LAST_LOG'" github.com/cgrates/cgrates/cmd/cgr-console
|
||||
cc=$?
|
||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o cgr-migrator -a -ldflags '-extldflags "-f no-PIC -static"' -tags 'osusergo netgo static_build' -ldflags "-X 'github.com/cgrates/cgrates/utils.GitLastLog=$GIT_LAST_LOG'" github.com/cgrates/cgrates/cmd/cgr-migrator
|
||||
cm=$?
|
||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o cgr-tester -a -ldflags '-extldflags "-f no-PIC -static"' -tags 'osusergo netgo static_build' -ldflags "-X 'github.com/cgrates/cgrates/utils.GitLastLog=$GIT_LAST_LOG'" github.com/cgrates/cgrates/cmd/cgr-tester
|
||||
ct=$?
|
||||
|
||||
exit $cr
|
||||
exit $cr || $cl || $cc || $cm || $ct
|
||||
|
||||
2
data/docker/scratch/cgr-console.doker
Normal file
2
data/docker/scratch/cgr-console.doker
Normal file
@@ -0,0 +1,2 @@
|
||||
FROM scratch
|
||||
ADD ./cgr-console /
|
||||
2
data/docker/scratch/cgr-engine.doker
Normal file
2
data/docker/scratch/cgr-engine.doker
Normal file
@@ -0,0 +1,2 @@
|
||||
FROM scratch
|
||||
ADD ./cgr-engine /
|
||||
2
data/docker/scratch/cgr-loader.doker
Normal file
2
data/docker/scratch/cgr-loader.doker
Normal file
@@ -0,0 +1,2 @@
|
||||
FROM scratch
|
||||
ADD ./cgr-loader /
|
||||
2
data/docker/scratch/cgr-migrator.doker
Normal file
2
data/docker/scratch/cgr-migrator.doker
Normal file
@@ -0,0 +1,2 @@
|
||||
FROM scratch
|
||||
ADD ./cgr-migrator /
|
||||
2
data/docker/scratch/cgr-tester.doker
Normal file
2
data/docker/scratch/cgr-tester.doker
Normal file
@@ -0,0 +1,2 @@
|
||||
FROM scratch
|
||||
ADD ./cgr-tester /
|
||||
Reference in New Issue
Block a user