This repository has been archived by the owner on Dec 31, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #88 from hardingadonis/dev
Miu Shop - v1.0.0
- Loading branch information
Showing
441 changed files
with
13,082 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# These are supported funding model platforms | ||
|
||
github: hardingadonis | ||
patreon: # Replace with a single Patreon username | ||
open_collective: # Replace with a single Open Collective username | ||
ko_fi: hardingadonis | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry | ||
liberapay: # Replace with a single Liberapay username | ||
issuehunt: # Replace with a single IssueHunt username | ||
otechie: # Replace with a single Otechie username | ||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry | ||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: 'Build with Maven' | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
||
name: 'Build with Maven' | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: 'Checkout repository' | ||
uses: actions/checkout@v4 | ||
|
||
- name: 'Set up JDK 8' | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '8' | ||
distribution: 'temurin' | ||
architecture: 'x64' | ||
|
||
- name: 'Build project with Maven' | ||
run: mvn verify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: 'Publish Miu Shop Images' | ||
|
||
on: | ||
workflow_run: | ||
workflows: [Release Miu Shop] | ||
types: | ||
- completed | ||
branches: | ||
- main | ||
|
||
jobs: | ||
publish: | ||
name: 'Publish Miu Shop Images' | ||
runs-on: ubuntu-latest | ||
|
||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: 'Checkout repository' | ||
uses: actions/checkout@v4 | ||
|
||
- name: 'Set up JDK 8' | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '8' | ||
distribution: 'temurin' | ||
architecture: 'x64' | ||
|
||
- name: 'Build project with Maven' | ||
run: | | ||
mvn verify | ||
- name: 'Get version' | ||
id: get_version | ||
run: | | ||
chmod +x get_version.sh | ||
echo "version=$(./get_version.sh)" >> $GITHUB_OUTPUT | ||
- name: 'Login ghcr.io' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: 'Publish Miu Shop Database' | ||
working-directory: ${{ github.workspace }}/database | ||
run: | | ||
docker build . -t ghcr.io/hardingadonis/miu-shop-database:${{ steps.get_version.outputs.version }} -t ghcr.io/hardingadonis/miu-shop-database:latest | ||
docker push ghcr.io/hardingadonis/miu-shop-database:${{ steps.get_version.outputs.version }} | ||
docker push ghcr.io/hardingadonis/miu-shop-database:latest | ||
- name: 'Publish Miu Shop Server' | ||
working-directory: ${{ github.workspace }}/server | ||
run: | | ||
docker build . -t ghcr.io/hardingadonis/miu-shop-server:${{ steps.get_version.outputs.version }} -t ghcr.io/hardingadonis/miu-shop-server:latest | ||
docker push ghcr.io/hardingadonis/miu-shop-server:${{ steps.get_version.outputs.version }} | ||
docker push ghcr.io/hardingadonis/miu-shop-server:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: 'Release Miu Shop' | ||
|
||
on: | ||
workflow_run: | ||
workflows: [Build with Maven] | ||
types: | ||
- completed | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
name: 'Release Miu Shop' | ||
runs-on: ubuntu-latest | ||
|
||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
|
||
steps: | ||
- name: 'Checkout repository' | ||
uses: actions/checkout@v4 | ||
|
||
- name: 'Get version' | ||
id: get_version | ||
run: | | ||
chmod +x get_version.sh | ||
echo "version=$(./get_version.sh)" >> $GITHUB_OUTPUT | ||
- name: 'Release Miu Shop' | ||
uses: softprops/[email protected] | ||
with: | ||
name: 'Miu Shop ${{ steps.get_version.outputs.version }}' | ||
tag_name: ${{ steps.get_version.outputs.version }} | ||
generate_release_notes: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"schedule": "daily", | ||
"ignoredFiles": [ | ||
"src/main/webapp/assets/images/banners/*", | ||
"src/main/webapp/assets/images/covers/*", | ||
"src/main/webapp/assets/images/favicon/*" | ||
], | ||
"compressWiki": "false", | ||
"minKBReduced": 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,106 @@ | ||
# miu-shop | ||
Miu Shop is a website that sells M.O.I cosmetics that are written in Java. | ||
# Miu Shop | ||
[![build](https://github.com/hardingadonis/miu-shop/actions/workflows/build.yml/badge.svg)](https://github.com/hardingadonis/miu-shop/actions/workflows/build.yml) | ||
[![publish](https://github.com/hardingadonis/miu-shop/actions/workflows/publish.yml/badge.svg)](https://github.com/hardingadonis/miu-shop/actions/workflows/publish.yml) | ||
[![release](https://github.com/hardingadonis/miu-shop/actions/workflows/release.yml/badge.svg)](https://github.com/hardingadonis/miu-shop/actions/workflows/release.yml) | ||
[![CodeFactor](https://www.codefactor.io/repository/github/hardingadonis/miu-shop/badge)](https://www.codefactor.io/repository/github/hardingadonis/miu-shop) | ||
![GitHub top language](https://img.shields.io/github/languages/top/hardingadonis/miu-shop) | ||
![GitHub repo size](https://img.shields.io/github/repo-size/hardingadonis/miu-shop) | ||
![GitHub License](https://img.shields.io/github/license/hardingadonis/miu-shop) | ||
> Miu Shop is a website that sells M.O.I cosmetics that are written in Java. | ||
|
||
## Requirements | ||
- JDK 8 | ||
- MySQL 8.1.0 | ||
- Tomcat 8.5 | ||
- Maven 3+ | ||
|
||
|
||
## Database | ||
<details> | ||
<summary>Database</summary> | ||
|
||
<div style="margin-top: 20px"> | ||
<a href="https://github.com/hardingadonis/miu-shop"> | ||
<img src="preview/database/database.svg"/> | ||
</a> | ||
</div> | ||
</details> | ||
|
||
|
||
## Preview | ||
<details> | ||
<summary>User page</summary> | ||
|
||
<div style="margin-top: 20px"> | ||
<a href="https://github.com/hardingadonis/miu-shop"> | ||
<img src="preview/user/about.png"/> | ||
</a> | ||
<a href="https://github.com/hardingadonis/miu-shop"> | ||
<img src="preview/user/add-address.png"/> | ||
</a> | ||
<a href="https://github.com/hardingadonis/miu-shop"> | ||
<img src="preview/user/cart.png"/> | ||
</a> | ||
<a href="https://github.com/hardingadonis/miu-shop"> | ||
<img src="preview/user/change-password.png"/> | ||
</a> | ||
<a href="https://github.com/hardingadonis/miu-shop"> | ||
<img src="preview/user/checkout.png"/> | ||
</a> | ||
<a href="https://github.com/hardingadonis/miu-shop"> | ||
<img src="preview/user/home.png"/> | ||
</a> | ||
<a href="https://github.com/hardingadonis/miu-shop"> | ||
<img src="preview/user/login.png"/> | ||
</a> | ||
<a href="https://github.com/hardingadonis/miu-shop"> | ||
<img src="preview/user/product.png"/> | ||
</a> | ||
<a href="https://github.com/hardingadonis/miu-shop"> | ||
<img src="preview/user/profile.png"/> | ||
</a> | ||
<a href="https://github.com/hardingadonis/miu-shop"> | ||
<img src="preview/user/purchase-history.png"/> | ||
</a> | ||
<a href="https://github.com/hardingadonis/miu-shop"> | ||
<img src="preview/user/purchase-history-detail.png"/> | ||
</a> | ||
<a href="https://github.com/hardingadonis/miu-shop"> | ||
<img src="preview/user/register.png"/> | ||
</a> | ||
<a href="https://github.com/hardingadonis/miu-shop"> | ||
<img src="preview/user/search.png"/> | ||
</a> | ||
<a href="https://github.com/hardingadonis/miu-shop"> | ||
<img src="preview/user/vnpay.png"/> | ||
</a> | ||
</div> | ||
</details> | ||
|
||
## Deployment | ||
### Download `docker-compose.yml`: | ||
```bash | ||
curl -O https://raw.githubusercontent.com/hardingadonis/miu-shop/main/docker-compose.yml | ||
``` | ||
### Run `docker-copmose`: | ||
```bash | ||
docker-compose up -d --build --force-recreate --remove-orphans --project-name miu | ||
``` | ||
### Access `Miu Shop`: | ||
- Open `http://localhost:80` in your browser. | ||
|
||
## Contributors: | ||
|
||
<a href="https://github.com/hardingadonis/miu-shop/graphs/contributors"> | ||
<img src="https://contrib.rocks/image?repo=hardingadonis/miu-shop" /> | ||
</a> | ||
|
||
|
||
## Licenses: | ||
- [Miu Shop](https://github.com/hardingadonis/miu-shop) is under the [Apache-2.0 license](https://github.com/hardingadonis/miu-shop/blob/main/LICENSE). | ||
- [location_data.json](https://raw.githubusercontent.com/hardingadonis/miu-shop/main/database/location_data.json) is collected by [DiaGioiHanhChinhVN](https://github.com/kenzouno1/DiaGioiHanhChinhVN). | ||
- [favicon](https://github.com/hardingadonis/miu-shop/blob/main/src/main/webapp/assets/images/favicon/favicon.png) is under the [flaticon](https://www.flaticon.com/free-icon/cosmetics_3194619). | ||
- [male](https://github.com/hardingadonis/miu-shop/blob/main/src/main/webapp/assets/images/avatars/male.webp) is under the [flaticon](https://www.flaticon.com/free-icon/man_3741578). | ||
- [female](https://github.com/hardingadonis/miu-shop/blob/main/src/main/webapp/assets/images/avatars/female.webp) is under the [flaticon](https://www.flaticon.com/free-icon/woman_3741715). | ||
- [Login Page Cover Image](https://unsplash.com/photos/white-and-orange-plastic-bottle-7tDGb3HrITg), [About Page Cover Image](https://unsplash.com/photos/assorted-make-up-brushes-closed-up-photography-pxax5WuM7eY) are under the [Unsplash License](https://unsplash.com/license). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM mysql:8.1.0 | ||
|
||
LABEL org.opencontainers.image.source=https://github.com/hardingadonis/miu-shop | ||
LABEL org.opencontainers.image.description="Container that runs MySQL for Miu Shop" | ||
LABEL org.opencontainers.image.licenses=Apache-2.0 | ||
|
||
LABEL [email protected] | ||
|
||
# Copy the database schema to the container | ||
COPY ./setup.sql /docker-entrypoint-initdb.d/setup.sql | ||
|
||
# Set the empty password for the root user | ||
ENV MYSQL_ALLOW_EMPTY_PASSWORD yes | ||
|
||
# Set the default database name | ||
ENV MYSQL_DATABASE=miu | ||
|
||
# Set the default charset and collation | ||
ENV LANG=C.UTF-8 | ||
ENV MYSQL_CHARSET=utf8mb4 | ||
ENV MYSQL_COLLATION=utf8mb4_general_ci | ||
|
||
# Set the default port | ||
EXPOSE 3306 |
Oops, something went wrong.