https://github.com/tedwon/milky
https://github.com/tedwon/milky
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/tedwon/milky
- Owner: tedwon
- Created: 2024-03-09T07:58:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-14T19:45:13.000Z (over 1 year ago)
- Last Synced: 2025-06-13T19:04:59.556Z (about 1 year ago)
- Language: HTML
- Size: 400 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
:author: Ted Won
:email: iamtedwon@gmail.com
:toc: left
= Milky
== milky apps
* milky-frontend server app based on https://nextjs.org/[Next.js,window=_blank]
* milky-backend server app based on https://quarkus.io/[Quarkus,window=_blank]
=== milky-backend server app
==== OpenAPI (Swagger UI)
* http://localhost:2403/q/swagger-ui/
==== Creating milky-backend server app
* Install quarkus CLI via https://quarkus.io/get-started/
* Create a new quarkus application
** https://quarkus.io/guides/getting-started#bootstrapping-the-project
[source,bash,options="nowrap"]
----
$ quarkus create app milky:milky-backend \
--extension='resteasy-reactive' \
--extension='resteasy-reactive-jackson' \
--extension='smallrye-openapi' \
--extension='hibernate-orm' \
--extension='jdbc-postgresql' \
--verbose
$ cd milky-backend
----
=== milky DB Container
* Use PostgreSQL image
** https://hub.docker.com/_/postgres
==== Run milky DB as a Container
[source,bash,options="nowrap"]
----
$ docker network create milky_net
$ sudo mkdir -p /var/db_data/milky_db_data
$ sudo chown -R $(whoami): /var/db_data/milky_db_data
$ docker run --rm=true -itd \
--name milky-db \
-v /var/db_data/milky_db_data:/var/lib/postgresql/data \
-e POSTGRES_USER=milky \
-e POSTGRES_PASSWORD=milky \
-e POSTGRES_DB=milky_db \
-p 5434:5432 \
--network milky_net \
postgres:latest
----
==== Start Milky with Docker Compose
[source,bash,options="nowrap"]
----
$ docker-compose -f docker-compose.yml up -d
----
===== Stop Milky with Docker Compose
[source,bash,options="nowrap"]
----
$ docker-compose -f docker-compose.yml down
----
=== milky-frontend
==== Create milky-frontend server app
* Install Node.js as guided in https://nextjs.org/docs/getting-started/installation
* Create a new Next.js app
[source,bash,options="nowrap"]
----
$ npx create-next-app@latest
Need to install the following packages:
create-next-app@14.1.3
Ok to proceed? (y) y
✔ What is your project named? … milky-frontend
✔ Would you like to use TypeScript? … No / Yes
✔ Would you like to use ESLint? … No / Yes
✔ Would you like to use Tailwind CSS? … No / Yes
✔ Would you like to use `src/` directory? … No / Yes
✔ Would you like to use App Router? (recommended) … No / Yes
✔ Would you like to customize the default import alias (@/*)? … No / Yes
Creating a new Next.js app in /private/tmp/milky-frontend.
Using npm.
Initializing project with template: app-tw
Installing dependencies:
- react
- react-dom
- next
Installing devDependencies:
- typescript
- @types/node
- @types/react
- @types/react-dom
- autoprefixer
- postcss
- tailwindcss
- eslint
- eslint-config-next
added 366 packages, and audited 367 packages in 42s
132 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Initialized a git repository.
Success! Created milky-frontend at /private/tmp/milky-frontend
----
* Install packages
[source,bash,options="nowrap"]
----
cd milky-frontend
npm install @mui/material @emotion/react @mui/x-data-grid @emotion/styled
----
* Run milky-frontend app in dev mode
** https://nextjs.org/docs/getting-started/installation#run-the-development-server
[source,bash,options="nowrap"]
----
cd milky-frontend
npm run dev
----
* Visit http://localhost:3000