Commit a42350ea authored by Reza Sahebgharan's avatar Reza Sahebgharan

windows2linux

parent 0d2ec3a4
Pipeline #1133 passed with stage
in 1 minute and 34 seconds
...@@ -22,10 +22,10 @@ build_in_devel: ...@@ -22,10 +22,10 @@ build_in_devel:
- echo "starting build in branch" - echo "starting build in branch"
# # - npm install # # - npm install
# # - npm run test-jest # # - npm run test-jest
# - docker-compose config - docker-compose config
# - docker-compose build - docker-compose build
# - docker push repo.marcopacs.com/karname/karname-app:$env:TAG_VERSION - docker push repo.marcopacs.com/karname/karname-app:$env:TAG_VERSION
- echo y | plink -ssh administrator@staging.marcopacs.ir "exit" - echo y | plink -ssh administrator@192.168.0.84 "exit"
# # - docker save -o ./scripts/karname-app.tar karname-app:$env:TAG_VERSION # save docker in scripts folder # # - docker save -o ./scripts/karname-app.tar karname-app:$env:TAG_VERSION # save docker in scripts folder
# # - echo y | pscp.exe -batch -l administrator -pw $env:StagingPass ./scripts/karname-app.tar staging.karname.ir:c:/Users/administrator/karname-app.tar # save docker in remote server # # - echo y | pscp.exe -batch -l administrator -pw $env:StagingPass ./scripts/karname-app.tar staging.karname.ir:c:/Users/administrator/karname-app.tar # save docker in remote server
# # - echo y | plink -batch -ssh administrator@staging.karname.ir -pw $env:StagingPass docker load -i c:/Users/administrator/karname-app.tar -q # # - echo y | plink -batch -ssh administrator@staging.karname.ir -pw $env:StagingPass docker load -i c:/Users/administrator/karname-app.tar -q
...@@ -34,16 +34,16 @@ build_in_devel: ...@@ -34,16 +34,16 @@ build_in_devel:
# # - Add-Content .\.env "$envtext" # # - Add-Content .\.env "$envtext"
# # - echo y | pscp.exe -batch -l administrator -pw $env:StagingPass ./.env staging.karname.ir:c:/Users/administrator/.env # save .env in remote server # # - echo y | pscp.exe -batch -l administrator -pw $env:StagingPass ./.env staging.karname.ir:c:/Users/administrator/.env # save .env in remote server
# # - echo y | plink -batch -ssh administrator@staging.karname.ir -pw $env:StagingPass -m ./scripts/command.bat # # - echo y | plink -batch -ssh administrator@staging.karname.ir -pw $env:StagingPass -m ./scripts/command.bat
- echo y | pscp.exe -batch -l administrator -pw $env:StagingPass ./docker-compose-staging.yml staging.marcopacs.ir:c:/Users/administrator/docker-compose.yml # save docker-compose.yml in remote server - echo y | pscp.exe -batch -l administrator -pw $env:StagingPass ./docker-compose-staging.yml 192.168.0.84:c:/Users/administrator/docker-compose.yml # save docker-compose.yml in remote server
- Set-Variable -Name "envtext" -Value "TAG_VERSION=$env:TAG_VERSION" - Set-Variable -Name "envtext" -Value "TAG_VERSION=$env:TAG_VERSION"
- New-Item -Path '.\.env' -ItemType File - New-Item -Path '.\.env' -ItemType File
- Add-Content .\.env "$envtext" - Add-Content .\.env "$envtext"
- Set-Variable -Name "envtext1" -Value "CONTAINERNAME=$env:CONTAINERNAME" - Set-Variable -Name "envtext1" -Value "CONTAINERNAME=$env:CONTAINERNAME"
- Add-Content .\.env "$envtext1" - Add-Content .\.env "$envtext1"
- echo y | pscp.exe -batch -l administrator -pw $env:StagingPass ./.env staging.marcopacs.ir:c:/Users/administrator/.env # save .env in remote server - echo y | pscp.exe -batch -l administrator -pw $env:StagingPass ./.env 192.168.0.84:c:/Users/administrator/.env # save .env in remote server
- Set-Variable -Name "batchtext" -Value "cd c:/Users/administrator&&docker-compose config&&docker-compose pull app&&docker-compose -p $env:CONTAINERNAME up -d --force-recreate" - Set-Variable -Name "batchtext" -Value "cd c:/Users/administrator&&docker-compose config&&docker-compose pull app&&docker-compose -p $env:CONTAINERNAME up -d --force-recreate"
- Add-Content .\command.bat "$batchtext" - Add-Content .\command.bat "$batchtext"
- echo y | plink -batch -ssh administrator@staging.marcopacs.ir -pw $env:StagingPass -m ./command.bat - echo y | plink -batch -ssh administrator@192.168.0.84 -pw $env:StagingPass -m ./command.bat
allow_failure: true allow_failure: true
only: only:
- /^.*staging.*/ - /^.*staging.*/
......
...@@ -5,17 +5,17 @@ services: ...@@ -5,17 +5,17 @@ services:
app: app:
restart: always restart: always
image: "repo.marcopacs.com/karname/karname-app:${TAG_VERSION}" image: "repo.marcopacs.com/karname/karname-app:${TAG_VERSION}"
# ports: ports:
# - '8090:3000' - '8090:80'
# depends_on: # depends_on:
# - mongo # - mongo
# links: # links:
# - mongo # - mongo
environment: environment:
ROOT_URL: ${APP_ROOT_URL:-http://localhost} ROOT_URL: ${APP_ROOT_URL:-http://localhost}
MONGO_URL: mongodb://mongo-windows:27018/karname MONGO_URL: mongodb://staging.marcopacs.ir:27018/karname
PORT: 80 PORT: 80
METEOR_SETTINGS: '{"worklistUrl":"http://karname-broker","databusUrl":"http://databus"}' METEOR_SETTINGS: '{"worklistUrl":"http://staging.marcopacs.ir:8086","databusUrl":"http://databus"}'
volumes: volumes:
- logsvol:/opt/bundle/programs/server/assets/app/logs - logsvol:/opt/bundle/programs/server/assets/app/logs
# mongo: # mongo:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment