Skip to content

Commit e554cff

Browse files
committed
docs: update
1 parent 9933112 commit e554cff

File tree

1 file changed

+43
-16
lines changed

1 file changed

+43
-16
lines changed

README.md

Lines changed: 43 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,76 @@
33
This is a landing page for the [PHP Revival](https://github.com/php-revival/php-revival) browser extension.
44

55
## Development
6-
### Without Docker
7-
You'll need to have Node and NPM installed on your machine to run it locally.
8-
6+
### NPM Commands
7+
All the available NPM command you can find in [package.json](package.json) file.
98
#### Install Dependencies
109
```bash
1110
npm i
12-
# or
13-
yarn
1411
```
1512

1613
#### Watch File Changes
1714
```bash
1815
npm run dev
19-
# or
20-
yarn dev
2116
```
2217

2318
Navigate to `http://localhost:3000` to see your documentation.
2419

25-
### With Docker
26-
#### Build an image
27-
To build an image, navigate to the root of the project that contains `Dockerfile` and run this command:
20+
### With Container Engine
21+
If you use a container engine like [🦦 Podman](https://podman.io/) or [🐳 Docker](https://app.docker.com/), here are the steps that you can make:
22+
23+
#### Build an Image
24+
To build an image, navigate to the root of the project and run this Docker command:
2825
```bash
2926
docker compose build
3027
```
28+
For Podman, run this:
29+
```bash
30+
podman-compose build
31+
```
32+
33+
#### Copy `node_modules` Locally
34+
If you need to copy `node_modules` directory from the container to your local machine, run this command for Docker:
35+
```bash
36+
docker cp php-revival-landing:/app/node_modules .
37+
```
38+
For Podman, run this:
39+
```bash
40+
podman cp php-revival-landing:/app/node_modules .
41+
```
42+
43+
> [!NOTE]
44+
> `node_modules` is excluded from using volume, that's why you need to copy it manually in [docker-compose.yml](docker-compose.yml) file. It's done to prevent your local modules to be copied to Linux container, since it can create incompatibility issues between operating systems if you don't use Linux.
3145
32-
#### Run the container
33-
To run a container, navigate to the root of the project that contains `Dockerfile` and run this command:
46+
#### Run the Container
47+
To run a container, navigate to the root of the project and run this Docker command:
3448
```bash
3549
docker compose up -d
3650
```
51+
For Podman, run this:
52+
```bash
53+
podman-compose up -d
54+
```
3755

3856
You can visit `http://localhost:3000` to see your documentation.
3957

40-
#### Enter the container
41-
To enter inside of the container, run this command:
58+
#### Enter the Container
59+
To enter inside of the container, run this Docker command:
4260
```bash
43-
docker exec -it php-revival-landing sh
61+
docker compose exec app sh
62+
```
63+
For Podman, run this:
64+
```bash
65+
podman-compose exec app sh
4466
```
4567

4668
You'll be able to run NPM commands inside of the container.
4769

48-
#### Stop the container
70+
#### Remove the Container
71+
To stop and remove the container, run this Docker command:
4972
```bash
5073
docker compose down
5174
```
75+
For Podman, run this:
76+
```bash
77+
podman-compose down
78+
```

0 commit comments

Comments
 (0)