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

Add basic support for Docker, both for development and deploy #261

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

starnutoditopo
Copy link

@starnutoditopo starnutoditopo commented Nov 26, 2023

Add basic support for Docker, both for development (with Visual Studio Code) and deploy.

This PR adds the capability to develop the project in container with Visual Studio Code (settings in the .devcontainer folder).
It also provides some raw support to run a python http.server in a Docker container, updating the res/config.js file according to the specified environment variables at startup (see run.sh and Dockerfile).

For the OpenAIP layer to work, the "openaip" key (you cen get one from https://openaip.net/) should be provided in the `res/config.json` file.
@@ -0,0 +1,55 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.183.0/containers/dotnet
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you base it on the dotnet template? (also commented out configs further below)

Would the python3 template make more sense?
https://github.com/microsoft/vscode-dev-containers/tree/v0.183.0/containers/python-3

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just used an image to let me debug.
Please, feel free to change it to anything more appropriate!

# In Visual Studio Code:
# edit ./res/config.json and set your API keys
# open a terminal and run:
# python3 -m http.server
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, sounds good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants