Browse Source

Introduce Docker Compose Config to build and run tabler locally (#1896)

* introduce docker compose config

* introduce docker compose config

* Create lucky-impalas-smash.md

---------

Co-authored-by: Paweł Kuna <1282324+codecalm@users.noreply.github.com>
Sebastian 9 months ago
parent
commit
5e7e0dd34e
3 changed files with 25 additions and 0 deletions
  1. 5 0
      .changeset/lucky-impalas-smash.md
  2. 5 0
      README.md
  3. 15 0
      docker-compose.yml

+ 5 - 0
.changeset/lucky-impalas-smash.md

@@ -0,0 +1,5 @@
+---
+"@tabler/core": patch
+---
+
+Introduce Docker Compose Config to build and run Ttabler locally

+ 5 - 0
README.md

@@ -130,6 +130,8 @@ npm install --save @tabler/core
 
 
 ## Running with Docker
 ## 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.
 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.
 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.
 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
 ### CDN support
 
 

+ 15 - 0
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