From 97f4ed87baf7629e484b3cff5f3e7e9fa0f390af Mon Sep 17 00:00:00 2001 From: "Dwight Spencer (denzuko@mastodon.social)" Date: Mon, 13 Nov 2023 09:01:42 -0500 Subject: [PATCH] feat: Add docker-compose.yml (#122) --- docker-development/README.md | 13 +++++++++++-- docker-development/docker-compose.yml | 13 +++++++++++++ docker-development/dockerfile | 4 +++- 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 docker-development/docker-compose.yml diff --git a/docker-development/README.md b/docker-development/README.md index fb1314b..ecb3376 100644 --- a/docker-development/README.md +++ b/docker-development/README.md @@ -10,16 +10,25 @@ Wave is no different from other web frameworks which means you can even reuse yo ## Installation -Linux / MacOS: +Clone the repo and `cd` into corresponding directory ```sh git clone https://github.com/h2oai/wave-apps.git cd wave-apps/docker-development +``` + +Linux / MacOS + +```sh docker build . -t wave_local_dev docker run -p 10101:10101 -v $(pwd)/src:/app/src wave_local_dev:latest ``` -TODO: Windows +or via `docker compose` + +```sh +docker compose up +``` ## Features diff --git a/docker-development/docker-compose.yml b/docker-development/docker-compose.yml new file mode 100644 index 0000000..b945228 --- /dev/null +++ b/docker-development/docker-compose.yml @@ -0,0 +1,13 @@ +--- +version: '3.8' + +services: + wave_local_dev: + build: + context: . + dockerfile: Dockerfile + ports: + - "10101:10101" + volumes: + - ./src:/app/src +... diff --git a/docker-development/dockerfile b/docker-development/dockerfile index f5ba247..2cdd3da 100644 --- a/docker-development/dockerfile +++ b/docker-development/dockerfile @@ -1,4 +1,6 @@ -FROM python:3.7 +# Force platform to download proper wheel (with waved included). +# An alternative is to either download wheel manually or download and run waved separately. +FROM --platform=linux/amd64 python:3.8 # Create a project directory. RUN mkdir /app