Skip to content

Commit 4f2c001

Browse files
fabiofabbrucciFabio Fabbrucci
and
Fabio Fabbrucci
authored
Creat a docker machine to let the tester run on docker (#1)
* Creat a docker machine to let the tester run on docker * README improved with instructions, docker imaged embedded in docker-compose file * Provided instructions how to run this procject with or without docker. Now docker automaticallly run vite after docker compose up * Provided instructions how to run this procject with or without docker. Now docker automaticallly run vite after docker compose up * Fixed requirements --------- Co-authored-by: Fabio Fabbrucci <[email protected]>
1 parent 0e20e82 commit 4f2c001

20 files changed

+40
-11
lines changed

Diff for: README.md

+26-8
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,42 @@
22
The only purpose of this repo is to be used as technical test for new QA Engineers.
33

44

5-
## What are the requirements to setup this project?
6-
This project requires `NodeJS` intalled on version 18+.
7-
8-
95
## How to setup this project?
106
Just clone the repo and install deps.
117

128
```bash
139
git clone URL
1410
cd qatest
15-
npm i
1611
```
1712

1813
## How to run this project?
19-
Run `dev` script from NPM.
2014

21-
```bash
15+
### How to run using Docker
16+
17+
In this case, you require [`Docker Desktop`](https://www.docker.com/products/docker-desktop/) intalled.
18+
19+
Then:
20+
21+
```
22+
cd docker
23+
# Run docker
24+
docker-compose up
25+
```
26+
27+
### How to run using your local node
28+
29+
In this case, you require `NodeJs` on version 18+ installed.
30+
31+
Then:
32+
33+
```
34+
cd project
35+
# Install dependencies
36+
npm i
37+
# Run dev Script
2238
npm run dev
2339
```
2440

25-
Then open your browser on the address [http://localhost:5173](http://localhost:5173).
41+
## How to open this project
42+
43+
Open your browser on the address [http://localhost:5173](http://localhost:5173).

Diff for: docker/docker-compose.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: '3.1'
2+
3+
services:
4+
node:
5+
image: node:lts-alpine3.17
6+
command: sh -c "npm i && npm run dev"
7+
working_dir: /workspace/project
8+
volumes:
9+
- ../project:/workspace/project:delegated
10+
ports:
11+
- "5173:5173"

Diff for: index.html renamed to project/index.html

File renamed without changes.
File renamed without changes.

Diff for: package.json renamed to project/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"version": "0.0.1",
55
"type": "module",
66
"scripts": {
7-
"dev": "vite",
8-
"build": "vite build",
9-
"preview": "vite preview"
7+
"dev": "./node_modules/.bin/vite --host",
8+
"build": "./node_modules/.bin/vite build",
9+
"preview": "./node_modules/.bin/vite preview"
1010
},
1111
"dependencies": {
1212
"qrcode-generator": "^1.4.4",
File renamed without changes.
File renamed without changes.

Diff for: src/App.jsx renamed to project/src/App.jsx

File renamed without changes.

Diff for: src/app.css renamed to project/src/app.css

File renamed without changes.
File renamed without changes.

Diff for: src/main.jsx renamed to project/src/main.jsx

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: src/router.jsx renamed to project/src/router.jsx

File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: vite.config.js renamed to project/vite.config.js

File renamed without changes.

0 commit comments

Comments
 (0)