Skip to content
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

329 add devcontainer dev server scripts to devcontainer path #330

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .devcontainer/api-server
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash

.venv-api/bin/flask --app cubeserver_api run --port 8081 "$@"
cd /code/
.venv-api/bin/flask --app cubeserver_api run --port 8081 "$@"
3 changes: 2 additions & 1 deletion .devcontainer/app-server
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash

.venv-app/bin/flask --app cubeserver_app.main run --port 8080 "$@"
cd /code/
.venv-app/bin/flask --app cubeserver_app.main run --port 8080 "$@"
3 changes: 3 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
8080,
8081
],
"remoteEnv": {
"PATH": "${containerEnv:PATH}:/code/bin/"
},
"customizations": {
"vscode": {
"extensions": [
Expand Down
4 changes: 2 additions & 2 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ services:
- ../src/CubeServer-api/requirements.txt:/code/requirements-api.txt:cached
- ../src/CubeServer-app/cubeserver_app:/code/cubeserver_app:cached
- ../src/CubeServer-app/requirements.txt:/code/requirements-app.txt:cached
- ./api-server:/code/api-server:cached
- ./app-server:/code/app-server:cached
- ./api-server:/code/bin/api-server:cached
- ./app-server:/code/bin/app-server:cached
- ../Docker/CubeServer/CubeServer-app/package_internal.sh:/code/package_internal.sh:cached
- ../Docker/CubeServer/CubeServer-app/package_lib.sh:/code/package_lib.sh:cached
build:
Expand Down
16 changes: 16 additions & 0 deletions README-DEV.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# DevContainer Setup

Either use the devcontainer locally or in GitHub Codespaces.
Once the container is built, the ports will automatically be forwarded.

To run the development webapp server, simply open a terminal in the devcontainer and run:

``` bash
app-server
```

To run the development api server, simply open a terminal in the devcontainer and run:

``` bash
api-server
```
Loading