-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Daniel Albuquerque
authored and
Daniel Albuquerque
committed
Jul 31, 2020
1 parent
71097a0
commit ed2a262
Showing
12 changed files
with
207 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
*.tgz | ||
*.tar.gz | ||
docker/protheus12/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Dockerfile | ||
.dockerignore | ||
.git | ||
./midia | ||
./totvs-downloads | ||
./totvs11 | ||
prepare-totvs11-rootfs.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.ZIP |
Binary file added
BIN
+97.3 MB
docker/totvs-appserver-docker/20-07-15-P12_APPSERVER_BUILD-19.3.0.5_LINUX_X64.TAR.GZ
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
FROM centos:7 | ||
|
||
LABEL maintainer "Enderson Maia <[email protected]>" | ||
|
||
RUN yum -y update \ | ||
&& yum -y install \ | ||
dmidecode \ | ||
fontconfig \ | ||
glib2 \ | ||
glibc \ | ||
libstdc++ \ | ||
libuuid \ | ||
wget \ | ||
&& rm -rf /var/cache/yum/* \ | ||
&& yum clean all | ||
|
||
RUN DUMB_INIT_SHA256="37f2c1f0372a45554f1b89924fbb134fc24c3756efaedf11e07f599494e0eff9" \ | ||
&& wget -O /usr/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64 \ | ||
&& echo "37f2c1f0372a45554f1b89924fbb134fc24c3756efaedf11e07f599494e0eff9 */usr/bin/dumb-init" | sha256sum -c - \ | ||
&& chmod +x /usr/bin/dumb-init | ||
|
||
COPY /build /build | ||
|
||
ADD 20-07-15-P12_APPSERVER_BUILD-19.3.0.5_LINUX_X64.TAR.GZ /totvs12/protheus/bin/appserver | ||
|
||
RUN /build/setup.sh | ||
|
||
EXPOSE 9999 | ||
|
||
VOLUME ["/totvs12/protheus_data", "/totvs12/protheus/apo/"] | ||
|
||
WORKDIR /totvs12/protheus/bin/appserver | ||
|
||
ENTRYPOINT [ "/usr/bin/dumb-init", "--" ] | ||
|
||
CMD [ "/usr/local/bin/my-init.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
USER = endersonmaia | ||
NAME = $(USER)/totvs-appserver | ||
VERSION = 17.3.0.13 | ||
|
||
.PHONY: all | ||
all: build | ||
|
||
.PHONY: build | ||
build: | ||
docker image build -t $(NAME):$(VERSION) --rm . | ||
|
||
.PHONY: tag_latest | ||
tag_latest: | ||
docker image tag $(NAME):$(VERSION) $(NAME):latest | ||
|
||
.PHONY: release | ||
release: | ||
docker image push $(NAME):$(VERSION) | ||
docker image push $(NAME):latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
[drivers] | ||
active=tcp | ||
|
||
[tcp] | ||
type=tcpip | ||
port=9999 | ||
|
||
[environment] | ||
SourcePath=/totvs12/protheus/apo/ | ||
RootPath=/totvs12/protheus_data/ | ||
StartPath=/system/ | ||
x2_path= | ||
RpoDb=Top | ||
RpoLanguage=portuguese | ||
RpoVersion=120 | ||
LocalFiles=ctree | ||
Trace=0 | ||
localdbextension=.dtc | ||
PictFormat=DEFAULT | ||
DateFormat=DEFAULT | ||
|
||
TOPDataBase=MSSQL | ||
TOPServer={{DBACCESS_SERVER}} | ||
TOPALIAS={{DBACCESS_ALIAS}} | ||
TOPMEMOMEGA=1 | ||
|
||
FWTRACELOG=1 | ||
StartSysInDB=1 | ||
|
||
[LockServer] | ||
Enable=0 | ||
;Server=127.0.0.1 | ||
Port=1234 | ||
|
||
[General] | ||
;CanAcceptFSRemote=1 | ||
InstallPath=/totvs12/protheus/bin/appserver | ||
CONSOLELOG=1 | ||
ConsoleFile=console.log | ||
MaxStringSize=10 | ||
BuildKillUsers=1 | ||
|
||
[LICENSECLIENT] | ||
SERVER=license | ||
PORT=5555 | ||
LOGMESSAGES=0 | ||
|
||
[SSLCONFIGURE] | ||
SSL2=1 | ||
SSL3=1 | ||
TLS1=2 | ||
Verbose=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
set -x | ||
|
||
# Configurando DBAccess | ||
export DBACCESS_SERVER=${DBACCESS_SERVER:-${DBACCESS_PORT_7890_TCP_ADDR}} | ||
export DBACCESS_ALIAS=${DBACCESS_ALIAS:-protheus} | ||
export DBACCESS_PORT=${DBACCESS_PORT:-7890} | ||
|
||
/bin/sed 's/{{DBACCESS_SERVER}}/'"${DBACCESS_SERVER}"'/' -i /totvs12/protheus/bin/appserver/appserver.ini | ||
/bin/sed 's/{{DBACCESS_ALIAS}}/'"${DBACCESS_ALIAS}"'/' -i /totvs12/protheus/bin/appserver/appserver.ini | ||
/bin/sed 's/{{DBACCESS_PORT}}/'"${DBACCESS_PORT}"'/' -i /totvs12/protheus/bin/appserver/appserver.ini | ||
|
||
# Aguardando conectividade com o dbaccess | ||
until echo -n > /dev/tcp/${DBACCESS_SERVER}/${DBACCESS_PORT} | ||
do | ||
echo "Esperando serviço do dbaccess..." | ||
sleep 0.5 | ||
done | ||
|
||
exec "/totvs12/protheus/bin/appserver/appsrvlinux" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
set -x | ||
|
||
TOTVS_PATH=/totvs12 | ||
|
||
mkdir -p $TOTVS_PATH/protheus/{apo,bin/appserver} | ||
|
||
cd $TOTVS_PATH/protheus/bin/appserver/ | ||
|
||
chmod 777 $TOTVS_PATH/protheus/bin/appserver/*.so | ||
|
||
echo $TOTVS_PATH/"protheus/bin/appserver/" > /etc/ld.so.conf.d/appserver64-libs.conf | ||
/sbin/ldconfig | ||
|
||
cp /build/my-init.sh /usr/local/bin/my-init.sh | ||
cp /build/appserver.ini $TOTVS_PATH/protheus/bin/appserver/ | ||
|
||
rm -rf /build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
- totvs11microsigaprotheus-server-11.0-1.i586.rpm | ||
- totvs11microsigaprotheus-rpo-all-top-por-11.0-1.i586.rpm | ||
- totvs11microsigaprotheus-systemload-bra-11.0-1.i586.rpm | ||
- totvs11microsigaprotheus-systemload-general-por-11.0-1.i586.rpm | ||
- totvs11microsigaprotheus-data-11.0-1.i586.rpm | ||
|
||
Não instalei o hlppo, HELP é desnecessário aqui : | ||
|
||
- totvs11microsigaprotheus-systemload-bra-hlppor-11.0-1.i586.rpm | ||
|
||
Remover pastas `desnecessárias` para gerar imagem menor | ||
|
||
protheus_data/samples/ | ||
protheus/bin/smarclient/ | ||
protheus/my\ projects/ | ||
|
||
* Processo de atualização da imagem | ||
|
||
Um forma de executar o processo de atualização do container é usar alguma diretiva | ||
ONBUILD e verificar se existe algo numa pasta ou volume /update que contenhas as atualizações | ||
este processo iria descompactar os arquivos, e substituir o conteúdo da pasta de : | ||
|
||
* binários | ||
* rop | ||
* include | ||
* libs | ||
* updates | ||
* etc | ||
|
||
|
||
ulimit -n 32768 | ||
ulimit -s 1024 | ||
ulimit -m 2048000 | ||
ulimit -v 2048000 | ||
|
||
|
||
$ ./appsrvlinux --help | ||
|
||
opcao --help invalida! | ||
|
||
-daemon: executa em background | ||
-log_server: executa como servidor de logs | ||
-balance_smart_client_desktop: executa como proxy para smart client desktop | ||
-balance_html: executa como proxy para html | ||
-balance_telnet: executa como proxy telnet | ||
-balance_web_services: executa como proxy web services |