-
Notifications
You must be signed in to change notification settings - Fork 3
Feature add docker compose for dev #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
mahsashadi
merged 5 commits into
BurnaSmartLab:master
from
pmzi:feature-add-docker-compose-for-dev
Mar 1, 2023
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9787a55
Add docker-compose and Dockerfile for easier development
pmzi e904788
Add docs to Readme and change env names
pmzi 87ce160
Remove installation of IP package as it is no longer needed
pmzi 0d4581c
Exclude dist files from being watched
pmzi f8022d3
Remove comments inside docker-compose.yml
pmzi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,4 @@ | ||
| ./demo/Dockerfile | ||
| ./docker-compose.yml | ||
| node_modules | ||
| ./dist |
This file contains hidden or 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 hidden or 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,16 @@ | ||
| FROM osjs/osjs | ||
|
|
||
| WORKDIR /usr/src/osjs | ||
|
|
||
| COPY ./package.json ./src/packages/osjs-office-collabora/package.json | ||
| RUN cd ./src/packages/osjs-office-collabora && npm i | ||
|
|
||
| COPY ./demo/start.sh ./start.sh | ||
| RUN chmod +x ./start.sh | ||
|
|
||
| COPY . ./src/packages/osjs-office-collabora/ | ||
| RUN cd ./src/packages/osjs-office-collabora && npm run build | ||
|
|
||
| RUN npm run package:discover | ||
|
|
||
| CMD ["./start.sh"] |
This file contains hidden or 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,50 @@ | ||
| /* | ||
| * OS.js - JavaScript Cloud/Web Desktop Platform | ||
| * | ||
| * Copyright (c) 2011-2020, Anders Evenrud <andersevenrud@gmail.com> | ||
| * All rights reserved. | ||
| * | ||
| * Redistribution and use in source and binary forms, with or without | ||
| * modification, are permitted provided that the following conditions are met: | ||
| * | ||
| * 1. Redistributions of source code must retain the above copyright notice, this | ||
| * list of conditions and the following disclaimer | ||
| * 2. Redistributions in binary form must reproduce the above copyright notice, | ||
| * this list of conditions and the following disclaimer in the documentation | ||
| * and/or other materials provided with the distribution | ||
| * | ||
| * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
| * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
| * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
| * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR | ||
| * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
| * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
| * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
| * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| * | ||
| * @author Anders Evenrud <andersevenrud@gmail.com> | ||
| * @licence Simplified BSD License | ||
| */ | ||
|
|
||
| // | ||
| // This is the server configuration tree. | ||
| // Guide: https://manual.os-js.org/config/#server | ||
| // Complete config tree: https://github.com/os-js/osjs-server/blob/master/src/config.js | ||
| // | ||
|
|
||
| const path = require('path'); | ||
| const root = path.resolve(__dirname, '../../'); | ||
|
|
||
| module.exports = { | ||
| root, | ||
| port: 8000, | ||
| public: path.resolve(root, 'dist'), | ||
| express:{ | ||
| maxBodySize:'1000000kb' | ||
| }, | ||
| office: { | ||
| collabora_online: process.env.collabora_online_URL | ||
| }, | ||
| }; |
This file contains hidden or 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,2 @@ | ||
| (cd ./src/packages/osjs-office-collabora && npm run watch) \ | ||
| & (npx nodemon --ignore 'dist/**/*' --watch package-lock.json --watch src/server --watch package.json --watch src/packages src/server/index.js) |
This file contains hidden or 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,24 @@ | ||
| # This is only for development | ||
|
|
||
| version: '3' | ||
|
|
||
| services: | ||
| osjs: | ||
| build: | ||
| context: . | ||
| dockerfile: ./demo/Dockerfile | ||
| ports: | ||
| - "8000:8000" | ||
| volumes: | ||
| - ./:/usr/src/osjs/src/packages/osjs-office-collabora | ||
| - ./demo/config.js:/usr/src/osjs/src/server/config.js | ||
| - /usr/src/osjs/src/packages/osjs-office-collabora/node_modules | ||
| environment: | ||
| - collabora_online_URL=http://192.168.1.103:9980 | ||
| - osjs_URL=http://192.168.1.103:8000 | ||
| collabora: | ||
| image: "collabora/code" | ||
| ports: | ||
| - "9980:9980" | ||
| environment: | ||
| - extra_params=--o:ssl.enable=false |
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We normally don't add
webpackandwebpack-clias adevDependencyof packages. They are already added in @osjs/dev-meta packageThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be added. Because this project needs
webpackitself and it should not depend onwebpackinstallation based on another project.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you can see here and here, these sample applications also do the same. So I think we'd better to follow the overall behaviour.