Commit c71469f0 authored by Reza Sahebgharan's avatar Reza Sahebgharan

devel final linux based config for docker

parent e7ad30c0
node_modules/
.meteor/local/
.vscode/
coverage/
__mock__/
__test__/
variables:
TAG_VERSION: ''
REMOTE_USERNAME: 'administrator'
REMOTE_IP: 'WinRun'
stages:
- build_in_branch
- cleanup_build
- build_in_master
build_in_branch:
before_script:
- $env:TAG_VERSION=(git describe --tag --abbrev=0)
- docker login -u reza.s -p aA123456 repo.marcopacs.com
stage: build_in_branch
tags:
- shell
script:
- echo "starting build in branch"
- npm install
- npm run test-jest
- docker-compose config
- docker-compose build
- echo y | plink -ssh administrator@staging.karname.ir "exit"
- 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 | plink -batch -ssh administrator@staging.karname.ir -pw $env:StagingPass docker load -i c:/Users/administrator/karname-app.tar -q
- echo y | pscp.exe -batch -l administrator -pw $env:StagingPass ./docker-compose-staging.yml staging.karname.ir:c:/Users/administrator/docker-compose.yml # save docker-compose.yml in remote server
- Set-Variable -Name "envtext" -Value "TAG_VERSION=$env:TAG_VERSION"
- New-Item -Path '.\.env' -ItemType File
- 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 | plink -batch -ssh administrator@staging.karname.ir -pw $env:StagingPass -m ./scripts/command.bat
# - ./scripts/command.ps1
allow_failure: true
except:
- master
build_in_master:
before_script:
- $env:TAG_VERSION=(git describe --tag --abbrev=0)
stage: build_in_master
tags:
- shell
script:
- echo "starting build in master"
- npm install
- npm run test-jest
- docker-compose config
- docker-compose build
- docker-compose up -d --force-recreate
allow_failure: true
only:
- master
on_build_failure:
stage: cleanup_build
script: RD /S /Q "C:\GitLab-Runner\builds"
when: on_failure
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [0.0.4](https://git.marcopacs.com/Reza.s/karname-ui/compare/v0.0.3...v0.0.4) (2019-10-17)
### [0.0.3](https://git.marcopacs.com/Reza.s/karname-ui/compare/v0.0.2...v0.0.3) (2019-10-13)
### Features
* **test gitlabci:** test test-jest standard-version docker-compose ([2c91f1d](https://git.marcopacs.com/Reza.s/karname-ui/commit/2c91f1d9d14b64e2c718d9f6c913c9166099e67a))
### Bug Fixes
* **fix gitlabci:** test gitlabci ([347c364](https://git.marcopacs.com/Reza.s/karname-ui/commit/347c3642f934cf9d9337b8d176d4417301841657))
* **test:** add npminstall to gitlab-ci ([c28320c](https://git.marcopacs.com/Reza.s/karname-ui/commit/c28320c77c2ca8454be830d711ce90ee1a875341))
* **test:** add on failure stage to delete files in failure ([375b277](https://git.marcopacs.com/Reza.s/karname-ui/commit/375b277a580c1401bb54ef045486b3a4ff859f4b))
* **test:** edit gitlabci ([0a01024](https://git.marcopacs.com/Reza.s/karname-ui/commit/0a0102452b353cc7cc7d7e276245152a0f235c9f))
* **test:** edit push to git and add its credentials ([15f67cd](https://git.marcopacs.com/Reza.s/karname-ui/commit/15f67cdd4a07e53b212d81aa6062798d67b67ee0))
* **test:** fix gitlab-ci for pushing changes ([92cc711](https://git.marcopacs.com/Reza.s/karname-ui/commit/92cc7115bb6d2e16044d976b2589e80341960ace))
* **test:** fix gitlab-ci for pushing to git ([7f78fcc](https://git.marcopacs.com/Reza.s/karname-ui/commit/7f78fcc898ccf275fba7ea1e36c91d3055c963a4))
* dsf ([e8b6ab1](https://git.marcopacs.com/Reza.s/karname-ui/commit/e8b6ab1260fa3dc36ab3c0a2a0818c33fc75437a))
* **test:** test standard-version & test-jest docker-compose ([a761881](https://git.marcopacs.com/Reza.s/karname-ui/commit/a7618811d65fdc83a6089503b85bd561cf7336f5))
......@@ -21,6 +21,7 @@ import { store } from './store/store';
import i18n from './plugins/i18n';
Meteor.startup(() => {
new Vue({
i18n,
......
version: '3'
services:
app:
container_name: karname-app
restart: on-failure
image: "karname/app:${TAG_VERSION}"
ports:
- '80:3000'
depends_on:
- mongo
links:
- mongo
environment:
ROOT_URL: ${APP_ROOT_URL:-http://localhost}
MONGO_URL: mongodb://mongo:27017/karname
PORT: 3000
METEOR_SETTINGS: '{"worklistUrl":"http://192.168.0.163"}'
mongo:
image: repo.marcopacs.com/kelishe/mongo:4.2.0
command:
- --storageEngine=wiredTiger
volumes:
- data:/data/db
volumes:
data:
\ No newline at end of file
......@@ -3,13 +3,14 @@ version: '3'
services:
app:
container_name: karname-app
restart: on-failure
build:
context: .
dockerfile: docker/devel/Dockerfile
image: karname/app:1.0
image: 'karname/app:${TAG_VERSION}'
ports:
- '5050:3000'
- '80:3000'
depends_on:
- mongo
links:
......@@ -18,9 +19,9 @@ services:
ROOT_URL: ${APP_ROOT_URL:-http://localhost}
MONGO_URL: mongodb://mongo:27017/karname
PORT: 3000
METEOR_SETTINGS: '{"worklistUrl":"http://192.168.0.156"}'
METEOR_SETTINGS: '{"worklistUrl":"http://192.168.0.163"}'
mongo:
image: mongo:latest
image: repo.marcopacs.com/kelishe/mongo:4.2.0
command:
- --storageEngine=wiredTiger
volumes:
......
# The tag here should match the Meteor version of your app, per .meteor/release
FROM geoffreybooth/meteor-base:1.8.1
# FROM geoffreybooth/meteor-base:1.8.1
FROM repo.marcopacs.com/kelishe/meteor-base:1.8.1
WORKDIR $APP_SOURCE_FOLDER/
......@@ -16,7 +18,8 @@ COPY . $APP_SOURCE_FOLDER/
RUN bash $SCRIPTS_FOLDER/build-meteor-bundle.sh
# Rather than Node 8 latest (Alpine), you can also use the specific version of Node expected by your Meteor release, per https://docs.meteor.com/changelog.html
FROM node:12-alpine
# FROM node:12-alpine
FROM repo.marcopacs.com/kelishe/node12.10.0:alpine3.9
ENV APP_BUNDLE_FOLDER /opt/bundle
ENV SCRIPTS_FOLDER /docker
......
This diff is collapsed.
{
"name": "karname-ui",
"private": true,
"version": "0.0.2",
"version": "0.0.4",
"scripts": {
"start": "meteor run --inspect --settings settings.json",
"test": "meteor test --once --driver-package meteortesting:mocha",
......@@ -9,7 +9,8 @@
"test-jest": "jest",
"test-jest-debug": "node --inspect-brk ./node_modules/jest/bin/jest.js --no-cache --runInBand",
"visualize": "meteor --production --extra-packages bundle-visualizer",
"build": "npm version --allow-same-version from-git || meteor run --inspect --settings settings.json"
"build": "npm version --allow-same-version from-git || meteor run --inspect --settings settings.json",
"release": "standard-version"
},
"dependencies": {
"@babel/plugin-transform-runtime": "^7.5.5",
......@@ -62,6 +63,7 @@
"meteor-jest-stubs": "^2.0.0",
"sass": "^1.22.9",
"sass-loader": "^7.2.0",
"standard-version": "^7.0.0",
"uglifyjs-webpack-plugin": "^2.2.0",
"vue-jest": "^3.0.5",
"vue-loader": "^15.7.1",
......@@ -94,7 +96,6 @@
".*\\.(vue)$": "<rootDir>/node_modules/vue-jest"
},
"collectCoverage": true,
"collectCoverageFrom": [
"**/*.{js,vue}",
"!**/node_modules/**",
......@@ -102,4 +103,4 @@
"!**/__mock__/**"
]
}
}
\ No newline at end of file
}
del /f /Q C:\Users\Administrator\setup-x86_64.exe
\ No newline at end of file
cd c:/Users/administrator && docker-compose config && docker-compose up -d --force-recreate
\ No newline at end of file
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