From 5e7e0dd34eb2c52950d7fed49c98e4dabcc98f08 Mon Sep 17 00:00:00 2001 From: Sebastian <101367275+sebastian-sommerfeld-io@users.noreply.github.com> Date: Fri, 14 Jun 2024 17:15:13 +0200 Subject: [PATCH] Introduce Docker Compose Config to build and run tabler locally (#1896) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * introduce docker compose config * introduce docker compose config * Create lucky-impalas-smash.md --------- Co-authored-by: Paweł Kuna <1282324+codecalm@users.noreply.github.com> --- .changeset/lucky-impalas-smash.md | 5 +++++ README.md | 5 +++++ docker-compose.yml | 15 +++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 .changeset/lucky-impalas-smash.md create mode 100644 docker-compose.yml diff --git a/.changeset/lucky-impalas-smash.md b/.changeset/lucky-impalas-smash.md new file mode 100644 index 000000000..779c31522 --- /dev/null +++ b/.changeset/lucky-impalas-smash.md @@ -0,0 +1,5 @@ +--- +"@tabler/core": patch +--- + +Introduce Docker Compose Config to build and run Ttabler locally diff --git a/README.md b/README.md index 8f8ef093d..580c11ac8 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,8 @@ npm install --save @tabler/core ## Running with Docker +**Plain Docker** + If you don't want to install node/npm/ruby and the dependencies on your local environment, you can use the provided Dockerfile to build a docker image. This Dockerfile is provided as an example to spin-up a container running Tabler. @@ -147,6 +149,9 @@ docker run -p 3000:3000 -p 3001:3001 -v $(pwd)/src:/app/src -v $(pwd)/_config.ym Now open your browser to [http://localhost:3000](http://localhost:3000). Edit anything in the `src/` folder and watch your browser refresh the page after it has been rebuilt. +**Docker Compose** + +You can also use the docker compose config from this repo. Use `docker compose build && docker compose up` or `docker compose up --build` to build and start the container. Edit anything in the `src/` folder the same way as with plain docker and access the same URLs and ports in your browser. ### CDN support diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..baeee48a9 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,15 @@ +--- +version: "3.3" +services: + + tabler: + image: tabler + container_name: tabler + build: . + ports: + - 3000:3000 + - 3001:3001 + volumes: + - ./src:/app/src + - ./_config.yml:/app/_config.yml + tty: true