Skip to content

Commit 66be32f

Browse files
committed
first commit
0 parents  commit 66be32f

24 files changed

+4212
-0
lines changed

.dockerignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# MacOS
2+
.DS_Store
3+
4+
dist/
5+
6+
# Dependency directories
7+
node_modules/

.eslintrc.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
3+
extends:
4+
- airbnb
5+
- "plugin:jest/recommended"
6+
- "plugin:react/recommended"
7+
8+
parser: babel-eslint
9+
10+
env:
11+
browser: true
12+
node: true
13+
jest: true
14+
15+
rules:
16+
import/no-unresolved: 0
17+
import/extensions: 0
18+
react/prop-types: 0

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
deploy:
13+
runs-on: ubuntu-latest
14+
if: ${{ github.event_name == 'push' }}
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: docker/setup-buildx-action@v3
20+
21+
- name: Log in to GitHub Container Registry
22+
uses: docker/login-action@v3
23+
with:
24+
registry: ghcr.io
25+
username: ${{ github.actor }}
26+
password: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Build and push
29+
uses: docker/build-push-action@v6
30+
with:
31+
context: .
32+
push: true
33+
cache-from: ghcr.io/${{ github.repository }}:latest
34+
cache-to: type=inline
35+
tags: ghcr.io/${{ github.repository }}:latest

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.swo
2+
*.swp
3+
.tern-port
4+
node_modules
5+
dist

Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM node:20.5.1-alpine3.18
2+
3+
RUN apk update
4+
RUN apk add --no-cache bash make expect
5+
6+
WORKDIR /usr/app
7+
COPY package.json /usr/app/package.json
8+
COPY package-lock.json /usr/app/package-lock.json
9+
RUN npm ci
10+
11+
COPY ./ /usr/app
12+
13+
RUN make build
14+
15+
EXPOSE 5039
16+
17+
CMD ["make", "start"]

Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
IMAGE_ID := ghcr.io/hexlet-components/qa-registration-form
2+
PORT := 5039
3+
4+
install:
5+
npm ci
6+
7+
build:
8+
npx vite build
9+
10+
start:
11+
npx serve -p $(PORT) dist
12+
13+
docker-build:
14+
docker build . -t $(IMAGE_ID)
15+
16+
docker-run:
17+
docker rm -f qa-registration-form
18+
docker run -e PORT=$(PORT) -p $(PORT):$(PORT) --name qa-registration-form $(IMAGE_ID)
19+
20+
docker-sh:
21+
docker run -e PORT=$(PORT) -it --entrypoint sh $(IMAGE_ID)

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Prerequisites
2+
3+
* Make
4+
* Docker
5+
6+
## Commands
7+
8+
See [Makefile](./Makefile)
9+
10+
```bash
11+
make docker-build
12+
make docker-run # Open http://localhost:5039
13+
```
14+
15+
---
16+
[![Hexlet Ltd. logo](https://raw.githubusercontent.com/Hexlet/assets/master/images/hexlet_logo128.png)](https://hexlet.io?utm_source=github&utm_medium=link&utm_campaign=hexlet-slim-example)
17+
18+
This repository is created and maintained by the team and the community of Hexlet, an educational project. [Read more about Hexlet](https://hexlet.io?utm_source=github&utm_medium=link&utm_campaign=hexlet-slim-example).
19+
20+
See most active contributors on [hexlet-friends](https://friends.hexlet.io/).

actions.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
clean:
2+
- exercise/solution

index.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE html>
2+
<html lang="ru">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7+
<title>QA registration form</title>
8+
9+
<!-- Bootstrap CSS -->
10+
<!-- CSS only -->
11+
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
12+
integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous">
13+
<link rel="stylesheet" href="/src/assets/index.css">
14+
</head>
15+
16+
<body class="h-100 bg-light">
17+
<div class="h-100">
18+
<div class="h-100" id="container"></div>
19+
</div>
20+
<script type="module" src="/src/index.jsx"></script>
21+
</body>
22+
23+
</html>

0 commit comments

Comments
 (0)