Skip to content

Commit

Permalink
Add quokka parent project
Browse files Browse the repository at this point in the history
  • Loading branch information
tedwon committed Dec 28, 2022
0 parents commit 7716425
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 0 deletions.
91 changes: 91 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
:author: Ted Won
:email: iamtedwon@gmail.com
:toc: left
:toclevels: 5
:sectnums:
:sectnumlevels: 5
:icons: font
:idprefix:
:idseparator: -


= https://github.com/tedwon/quokka[Quokka Project]

== https://github.com/tedwon/quokka-backend[Simple Memo App Project based on Quarkus with Java]

== Quokka Projects

https://github.com/tedwon/quokka

=== Quokka Backend Project

https://github.com/tedwon/quokka-backend

https://hub.docker.com/repository/docker/tedwon/quokka-backend


=== Quokka Frontend Project

https://github.com/tedwon/quokka-frontend

https://hub.docker.com/repository/docker/tedwon/quokka-frontend

=== Quokka DB Project

https://hub.docker.com/_/postgres


== Run Quokka Projects with Docker

[source,bash,options="nowrap"]
----
docker network create quokka_net
sudo mkdir /private/var/quokka_db_data
sudo chown -R <user>:<group> /private/var/quokka_db_data
ls -al /var/quokka_db_data
docker run --rm=true -itd \
--name quokka-db \
-v /var/quokka_db_data:/var/lib/postgresql/data \
-e POSTGRES_USER=quokka \
-e POSTGRES_PASSWORD=quokka \
-e POSTGRES_DB=quokka_db \
-p 5432:5432 \
--network quokka_net \
postgres:latest
cd quokka-backend
./mvnw clean package
docker build -f src/main/docker/Dockerfile.jvm -t tedwon/quokka-backend:0.1.0 .
docker run -i --rm -p 8080:8080 --network quokka_net tedwon/quokka-backend:0.1.0
cd quokka-frontend
docker build -t tedwon/quokka-frontend:0.1.0 .
docker run -p 3000:3000 --network quokka_net tedwon/quokka-frontend:0.1.0
----

== Run Quokka with Docker Compose

[source,bash,options="nowrap"]
----
docker-compose -f docker-compose.yml up -d
----

== Stop Quokka with Docker Compose

[source,bash,options="nowrap"]
----
docker-compose -f docker-compose.yml down
----

== Push Quokka projects to Docker Hub

* https://hub.docker.com/repository/docker/tedwon/quokka-backend
* https://hub.docker.com/repository/docker/tedwon/quokka-backend

[source,bash,options="nowrap"]
----
docker push tedwon/quokka-backend:0.1.0
docker push tedwon/quokka-frontend:0.1.0
----
27 changes: 27 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: "3.9"
services:
db:
image: postgres:latest
volumes:
- /var/quokka_db_data:/var/lib/postgresql/data
ports:
- "5432:5432"
restart: always
environment:
POSTGRES_USER: quokka
POSTGRES_PASSWORD: quokka
POSTGRES_DB: quokka_db
backend:
depends_on:
- db
image: tedwon/quokka-backend:0.1.0
ports:
- "8080:8080"
restart: always
frontend:
depends_on:
- backend
image: tedwon/quokka-frontend:0.1.0
ports:
- "3000:3000"
restart: always

0 comments on commit 7716425

Please sign in to comment.