diff --git a/README.md b/README.md index 6404e7add..1e05d7a5c 100644 --- a/README.md +++ b/README.md @@ -127,19 +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 | - -> 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 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