From 03c0b1fa3b74e75655c9ed973180b2a8aff3ccce Mon Sep 17 00:00:00 2001 From: Erison Silva Date: Sun, 19 Nov 2023 10:23:10 +0100 Subject: [PATCH 1/2] feat: Add docker-compose file - Add `docker-compose.yml` file - Add docker commands into the README.md file Close #172 --- README.md | 28 +++++++++++++++++----------- docker-compose.yml | 11 +++++++++++ 2 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 docker-compose.yml diff --git a/README.md b/README.md index 6404e7add..5924cab03 100644 --- a/README.md +++ b/README.md @@ -127,17 +127,23 @@ PUBLIC_GOOGLE_SITE_VERIFICATION=your-google-site-verification-value All commands are run from the root of the project, from a terminal: -| Command | Action | -| :--------------------- | :------------------------------------------------------------------------------------------------------------------------------- | -| `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:4321` | -| `npm run build` | Build your production site to `./dist/` | -| `npm run preview` | Preview your build locally, before deploying | -| `npm run format:check` | Check code format with Prettier | -| `npm run format` | Format codes with Prettier | -| `npm run sync` | Generates TypeScript types for all Astro modules. [Learn more](https://docs.astro.build/en/reference/cli-reference/#astro-sync). | -| `npm run cz` | Commit code changes with commitizen | -| `npm run lint` | Lint with ESLint | +> **Note** +> - For `Docker` commands we must have it [installed](https://docs.docker.com/engine/install/) in your machine. + +| Command | Action | +| :------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------- | +| `npm install` | Installs dependencies | +| `npm run dev` | Starts local dev server at `localhost:4321` | +| `npm run build` | Build your production site to `./dist/` | +| `npm run preview` | Preview your build locally, before deploying | +| `npm run format:check` | Check code format with Prettier | +| `npm run format` | Format codes with Prettier | +| `npm run sync` | Generates TypeScript types for all Astro modules. [Learn more](https://docs.astro.build/en/reference/cli-reference/#astro-sync). | +| `npm run cz` | Commit code changes with commitizen | +| `npm run lint` | Lint with ESLint | +| `docker compose up -d` | Run AstroPaper on docker, You can access with the same hostname and port informed on `dev` command. | +| `docker compose run app npm install` | You can run any command above into the docker container. | + > Warning! Windows PowerShell users may need to install the [concurrently package](https://www.npmjs.com/package/concurrently) if they want to [run diagnostics](https://docs.astro.build/en/reference/cli-reference/#astro-check) during development (`astro check --watch & astro dev`). For more info, see [this issue](https://github.com/satnaing/astro-paper/issues/113). diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..58355f756 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3' + +services: + app: + image: node:18 + ports: + - 4321:4321 + working_dir: /app + command: npm run dev -- --host 0.0.0.0 + volumes: + - ./:/app From e6084c0210a2aea60cd336c2db9280bb9ebb7dd9 Mon Sep 17 00:00:00 2001 From: Sat Naing Date: Wed, 13 Dec 2023 15:24:13 +0630 Subject: [PATCH 2/2] docs: update README for style consistency --- README.md | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 5924cab03..1e05d7a5c 100644 --- a/README.md +++ b/README.md @@ -127,25 +127,23 @@ PUBLIC_GOOGLE_SITE_VERIFICATION=your-google-site-verification-value All commands are run from the root of the project, from a terminal: -> **Note** -> - For `Docker` commands we must have it [installed](https://docs.docker.com/engine/install/) in your machine. - -| Command | Action | -| :------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------- | -| `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:4321` | -| `npm run build` | Build your production site to `./dist/` | -| `npm run preview` | Preview your build locally, before deploying | -| `npm run format:check` | Check code format with Prettier | -| `npm run format` | Format codes with Prettier | -| `npm run sync` | Generates TypeScript types for all Astro modules. [Learn more](https://docs.astro.build/en/reference/cli-reference/#astro-sync). | -| `npm run cz` | Commit code changes with commitizen | -| `npm run lint` | Lint with ESLint | -| `docker compose up -d` | Run AstroPaper on docker, You can access with the same hostname and port informed on `dev` command. | -| `docker compose run app npm install` | You can run any command above into the docker container. | - - -> Warning! Windows PowerShell users may need to install the [concurrently package](https://www.npmjs.com/package/concurrently) if they want to [run diagnostics](https://docs.astro.build/en/reference/cli-reference/#astro-check) during development (`astro check --watch & astro dev`). For more info, see [this issue](https://github.com/satnaing/astro-paper/issues/113). +> **_Note!_** For `Docker` commands we must have it [installed](https://docs.docker.com/engine/install/) in your machine. + +| Command | Action | +| :----------------------------------- | :------------------------------------------------------------------------------------------------------------------------------- | +| `npm install` | Installs dependencies | +| `npm run dev` | Starts local dev server at `localhost:4321` | +| `npm run build` | Build your production site to `./dist/` | +| `npm run preview` | Preview your build locally, before deploying | +| `npm run format:check` | Check code format with Prettier | +| `npm run format` | Format codes with Prettier | +| `npm run sync` | Generates TypeScript types for all Astro modules. [Learn more](https://docs.astro.build/en/reference/cli-reference/#astro-sync). | +| `npm run cz` | Commit code changes with commitizen | +| `npm run lint` | Lint with ESLint | +| `docker compose up -d` | Run AstroPaper on docker, You can access with the same hostname and port informed on `dev` command. | +| `docker compose run app npm install` | You can run any command above into the docker container. | + +> **_Warning!_** Windows PowerShell users may need to install the [concurrently package](https://www.npmjs.com/package/concurrently) if they want to [run diagnostics](https://docs.astro.build/en/reference/cli-reference/#astro-check) during development (`astro check --watch & astro dev`). For more info, see [this issue](https://github.com/satnaing/astro-paper/issues/113). ## ✨ Feedback & Suggestions