-
Notifications
You must be signed in to change notification settings - Fork 822
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
Test collab changes #4041
base: test-collab
Are you sure you want to change the base?
Test collab changes #4041
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
node_modules/ | ||
*~ | ||
environment |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,36 @@ | ||
name: musicblocks | ||
services: | ||
musicblocks: | ||
build: https://github.com/sugarlabs/musicblocks.git#collaboration | ||
# build: https://github.com/sugarlabs/musicblocks.git#test-collab | ||
build: | ||
context: ./ | ||
ports: | ||
- "3000:3000" | ||
#command: ["python", "-m", "http.server", "3000", "--bind", "0.0.0.0"] | ||
command: ["python", "-m", "http.server", "3000", "--bind", "0.0.0.0"] | ||
env_file: | ||
- ./environment | ||
#planet-server: | ||
# build: | ||
# dockerfile: ./planet-server/Dockerfile | ||
#volumes: | ||
# - planet-server/planet.sql: | ||
planet-mysql: | ||
image: mysql:8.0 | ||
environment: | ||
MYSQL_ROOT_PASSWORD: root | ||
MYSQL_DATABASE: planet | ||
volumes: | ||
- /Users/ajeetpratapsingh/Developer/os/planet-server/planet.sql | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It'll be great if you don't hard code values like this because if I was testing, I wouldn't have that directory and that'll break things. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have created a local db planet-mysql for testing purpose and I assume, we will also have a db on our remote server to reference a volume like this and this path /Users/ajeetpratapsingh/Developer/os/planet-server/planet.sql will be changed to server's local path. is there any better way to add volume, like fetching from somewhere? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You could just reference a volume with it's name and it'll automatically be created if it doesn't exist, no need for a path to an existing volume. If you want to mount a db that's part of the repo in the container, then that's something you can still do. |
||
ports: | ||
- "3306:3306" | ||
planet-server: | ||
build: | ||
dockerfile: ../planet-server/Dockerfile | ||
ports: | ||
- "8080:8080" | ||
collaboration-server: | ||
#build: https://github.com/sugarlabs/collaboration-server.git | ||
build: | ||
dockerfile: ./collaboration-server/Dockerfile | ||
dockerfile: ../collaboration-server/Dockerfile | ||
volumes: | ||
- .:/collaboration-server | ||
environment: | ||
NODE_ENV: development | ||
#command: ["npm", "run", "server"] | ||
command: ["npm", "run", "serve"] | ||
command: ["npm", "run", "server"] | ||
|
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.
Seems this was needed for a test, the idea here is to build from this repo and not local sources.
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.
Yeah, I tried this lots of time but it was not building the image from the remote repo (my network can be the reason, I'll try again). Just for testing purpose, I tried to build using the local repo as it contains the same code.
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.
It's probably an issue with your network, did you try again and did it work?
If it's your network then you can do this locally without committing it.