Commit 28070e6a authored by Reza Sahebgharan's avatar Reza Sahebgharan

create folder for Dockerfile for linux and windows

parent 2f82e00d
Pipeline #450 canceled with stages
in 16 seconds
...@@ -22,7 +22,6 @@ build_in_branch: ...@@ -22,7 +22,6 @@ build_in_branch:
- docker-compose build - docker-compose build
- echo y | plink -ssh administrator@staging.karname.ir "exit" - 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 - 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
- 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 - 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
......
version: '3'
services:
app:
container_name: karname-app
restart: on-failure
build:
context: .
dockerfile: docker/linux/Dockerfile
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
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
...@@ -7,7 +7,7 @@ services: ...@@ -7,7 +7,7 @@ services:
restart: on-failure restart: on-failure
build: build:
context: . context: .
dockerfile: docker/devel/Dockerfile dockerfile: docker/windows/Dockerfile
image: 'karname/app:${TAG_VERSION}' image: 'karname/app:${TAG_VERSION}'
ports: ports:
- '80:3000' - '80:3000'
...@@ -21,11 +21,11 @@ services: ...@@ -21,11 +21,11 @@ services:
PORT: 3000 PORT: 3000
METEOR_SETTINGS: '{"worklistUrl":"http://192.168.0.163"}' METEOR_SETTINGS: '{"worklistUrl":"http://192.168.0.163"}'
mongo: mongo:
image: repo.marcopacs.com/kelishe/mongo:4.2.0 image: mongo
command: command:
- --storageEngine=wiredTiger - --storageEngine=wiredTiger
volumes: volumes:
- data:/data/db - data:D:\mongodata
volumes: volumes:
data: data:
\ No newline at end of file
# The tag here should match the Meteor version of your app, per .meteor/release
FROM geoffreybooth/meteor-base:1.8.1
WORKDIR $APP_SOURCE_FOLDER/
# Copy app package.json and package-lock.json into container
COPY ./package*.json $APP_SOURCE_FOLDER/
RUN bash $SCRIPTS_FOLDER/build-app-npm-dependencies.sh
# Copy app source into container
COPY . $APP_SOURCE_FOLDER/
# COPY ./docker/build-meteor-bundle.sh $SCRIPTS_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
ENV APP_BUNDLE_FOLDER /opt/bundle
ENV SCRIPTS_FOLDER /docker
# Install OS build dependencies, which we remove later after we’ve compiled native Node extensions
RUN apk --no-cache --virtual .node-gyp-compilation-dependencies add \
g++ \
make \
python \
# And runtime dependencies, which we keep
&& apk --no-cache add \
bash \
ca-certificates
# Copy in entrypoint
COPY --from=0 $SCRIPTS_FOLDER $SCRIPTS_FOLDER/
# Copy in app bundle
COPY --from=0 $APP_BUNDLE_FOLDER/bundle $APP_BUNDLE_FOLDER/bundle/
RUN bash $SCRIPTS_FOLDER/build-meteor-npm-dependencies.sh --build-from-source \
&& apk del .node-gyp-compilation-dependencies
# Start app
ENTRYPOINT ["/docker/entrypoint.sh"]
CMD ["node", "main.js"]
\ 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