Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

Commit

Permalink
Merge pull request #63 from hardingadonis/dev
Browse files Browse the repository at this point in the history
Sale Dock - v0.3.0
  • Loading branch information
hardingadonis authored Jan 20, 2024
2 parents b0c3fda + 90f075a commit 640a2db
Show file tree
Hide file tree
Showing 57 changed files with 857 additions and 183 deletions.
125 changes: 119 additions & 6 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,120 @@
{
"projectName": "saledock",
"projectOwner": "hardingadonis",
"files": ["README.md"],
"contributorTemplate": "<a href=\"<%= contributor.profile %>\"><img src=\"<%= contributor.avatar_url %>\" width=\"<%= options.imageSize %>px;\" alt=\"\"/><br /><sub><b><%= contributor.name %></b></sub></a>",
"contributors": []
}
"projectName": "saledock",
"projectOwner": "hardingadonis",
"files": [
"README.md"
],
"contributors": [
{
"login": "hardingadonis",
"name": "Minh Vương",
"avatar_url": "https://avatars.githubusercontent.com/u/34091632?v=4",
"profile": "https://github.com/hardingadonis",
"contributions": [
"code",
"data",
"doc",
"maintenance",
"review",
"design",
"projectManagement"
]
},
{
"login": "bakaqc",
"name": "Đinh Quốc Chương",
"avatar_url": "https://avatars.githubusercontent.com/u/126387856?v=4",
"profile": "https://github.com/bakaqc",
"contributions": [
"code",
"doc",
"review",
"maintenance"
]
},
{
"login": "htnghia1423",
"name": "Thunder",
"avatar_url": "https://avatars.githubusercontent.com/u/137130942?v=4",
"profile": "https://github.com/htnghia1423",
"contributions": [
"code",
"doc",
"review",
"maintenance"
]
},
{
"login": "yuhtnguyen",
"name": "Yuht",
"avatar_url": "https://avatars.githubusercontent.com/u/137138731?v=4",
"profile": "https://github.com/yuhtnguyen",
"contributions": [
"code",
"doc",
"review"
]
},
{
"login": "linhlm0210",
"name": "linhlm0210",
"avatar_url": "https://avatars.githubusercontent.com/u/147788973?v=4",
"profile": "https://github.com/linhlm0210",
"contributions": [
"code",
"doc",
"review"
]
},
{
"login": "thson58",
"name": "Nguyen Son",
"avatar_url": "https://avatars.githubusercontent.com/u/152074875?v=4",
"profile": "https://github.com/thson58",
"contributions": [
"code",
"doc",
"review"
]
},
{
"login": "all-contributors",
"name": "All Contributors",
"avatar_url": "https://avatars.githubusercontent.com/u/46410174?v=4",
"profile": "https://allcontributors.org",
"contributions": [
"plugin",
"tool"
]
},
{
"login": "ImgBotApp",
"name": "Imgbot",
"avatar_url": "https://avatars.githubusercontent.com/u/31427850?v=4",
"profile": "https://imgbot.net",
"contributions": [
"plugin",
"tool"
]
},
{
"login": "code-factor",
"name": "Automated code reviews",
"avatar_url": "https://avatars.githubusercontent.com/u/13309880?v=4",
"profile": "https://www.codefactor.io",
"contributions": [
"plugin",
"tool",
"bug",
"review"
]
}
],
"commitType": "docs",
"commitConvention": "angular",
"contributorsPerLine": 5,
"linkToUsage": true,
"skipCi": true,
"imageSize": 100,
"contributorTemplate": "<a href=\"<%= contributor.profile %>\"><img src=\"<%= contributor.avatar_url %>\" width=\"<%= options.imageSize %>px;\" alt=\"\"/><br /><sub><b><%= contributor.name %></b></sub></a>"
}
62 changes: 62 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: 'Publish Sale Dock Images'

on:
workflow_run:
workflows: [Release Sale Dock]
types:
- completed
branches:
- main

jobs:
publish:
name: 'Publish Sale Dock 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 17'
uses: actions/setup-java@v3
with:
java-version: '17'
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 Sale Dock Database'
working-directory: ${{ github.workspace }}/database
run: |
docker build . -t ghcr.io/hardingadonis/saledock-database:${{ steps.get_version.outputs.version }} -t ghcr.io/hardingadonis/saledock-database:latest
docker push ghcr.io/hardingadonis/saledock-database:${{ steps.get_version.outputs.version }}
docker push ghcr.io/hardingadonis/saledock-database:latest
- name: 'Publish Sale Dock Server'
working-directory: ${{ github.workspace }}/server
run: |
docker build . -t ghcr.io/hardingadonis/saledock-server:${{ steps.get_version.outputs.version }} -t ghcr.io/hardingadonis/saledock-server:latest
docker push ghcr.io/hardingadonis/saledock-server:${{ steps.get_version.outputs.version }}
docker push ghcr.io/hardingadonis/saledock-server:latest
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,32 @@ docker-compose up -d
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="20%"><a href="https://github.com/hardingadonis"><img src="https://avatars.githubusercontent.com/u/34091632?v=4" width="100px;" alt=""/><br /><sub><b>Minh Vương</b></sub></a></td>
<td align="center" valign="top" width="20%"><a href="https://github.com/bakaqc"><img src="https://avatars.githubusercontent.com/u/126387856?v=4" width="100px;" alt=""/><br /><sub><b>Đinh Quốc Chương</b></sub></a></td>
<td align="center" valign="top" width="20%"><a href="https://github.com/htnghia1423"><img src="https://avatars.githubusercontent.com/u/137130942?v=4" width="100px;" alt=""/><br /><sub><b>Thunder</b></sub></a></td>
<td align="center" valign="top" width="20%"><a href="https://github.com/yuhtnguyen"><img src="https://avatars.githubusercontent.com/u/137138731?v=4" width="100px;" alt=""/><br /><sub><b>Yuht</b></sub></a></td>
<td align="center" valign="top" width="20%"><a href="https://github.com/linhlm0210"><img src="https://avatars.githubusercontent.com/u/147788973?v=4" width="100px;" alt=""/><br /><sub><b>linhlm0210</b></sub></a></td>
</tr>
<tr>
<td align="center" valign="top" width="20%"><a href="https://github.com/thson58"><img src="https://avatars.githubusercontent.com/u/152074875?v=4" width="100px;" alt=""/><br /><sub><b>Nguyen Son</b></sub></a></td>
<td align="center" valign="top" width="20%"><a href="https://allcontributors.org"><img src="https://avatars.githubusercontent.com/u/46410174?v=4" width="100px;" alt=""/><br /><sub><b>All Contributors</b></sub></a></td>
<td align="center" valign="top" width="20%"><a href="https://imgbot.net"><img src="https://avatars.githubusercontent.com/u/31427850?v=4" width="100px;" alt=""/><br /><sub><b>Imgbot</b></sub></a></td>
<td align="center" valign="top" width="20%"><a href="https://www.codefactor.io"><img src="https://avatars.githubusercontent.com/u/13309880?v=4" width="100px;" alt=""/><br /><sub><b>Automated code reviews</b></sub></a></td>
</tr>
</tbody>
<tfoot>
<tr>
<td align="center" size="13px" colspan="5">
<img src="https://raw.githubusercontent.com/all-contributors/all-contributors-cli/1b8533af435da9854653492b1327a23a4dbd0a10/assets/logo-small.svg">
<a href="https://all-contributors.js.org/docs/en/bot/usage">Add your contributions</a>
</img>
</td>
</tr>
</tfoot>
</table>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
Expand Down
24 changes: 24 additions & 0 deletions database/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM mysql:8.2.0

LABEL org.opencontainers.image.source=https://github.com/hardingadonis/saledock
LABEL org.opencontainers.image.description="Container that runs MySQL for Sale Dock"
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=saledock

# 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
2 changes: 1 addition & 1 deletion database/database.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 640a2db

Please sign in to comment.