fix: ghcr references and old files (#18)
# What - Closes #17 # Why - Keep the repo updated with needed files onlyReviewed-on: #18
This commit is contained in:
+10
-4
@@ -9,7 +9,7 @@ If you want to contribute, please create a fork and a Merge Request. Take a look
|
||||
## Steps to Contribute
|
||||
|
||||
1. Fork the Project
|
||||
2. Clone it on your local (`git clone https://github.com/ricardo-campos-org/react-typescript-todolist`)
|
||||
2. Clone it on your local (`git clone https://lightroasted.vps-kinghost.net/rmcampos/tasknote.git`)
|
||||
3. Develop your amazing feature/changes
|
||||
4. Make sure your name is set (`git config user.name 'YOUR NAME'; git config user.email 'YOUR EMAIL'`)
|
||||
5. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
||||
@@ -24,19 +24,25 @@ The easiest way of having the app up and running is using [Docker](https://www.d
|
||||
|
||||
1. Start the database engine (PostgreSQL)
|
||||
```sh
|
||||
bash tools/run-docker-db.sh
|
||||
task dev-run-db
|
||||
```
|
||||
2. Start the back-end engine (Java & Spring Boot)
|
||||
```sh
|
||||
bash tools/run-docker-server.sh
|
||||
task dev-run-api
|
||||
```
|
||||
3. Start the app server
|
||||
```sh
|
||||
bash tools/run-docker-client.sh
|
||||
task dev-run-web
|
||||
```
|
||||
|
||||
> Remember to follow up logs with 'docker ps' and 'docker logs -f <name>'
|
||||
|
||||
Or start all services at once with Docker Compose:
|
||||
|
||||
```sh
|
||||
docker compose -f docker-compose.dev.yml up -d
|
||||
```
|
||||
|
||||
If everything went well, you can head to [http://localhost:5000](http://localhost:5000) and create your user.
|
||||
|
||||
## 🦾 Automation
|
||||
|
||||
+2
-2
@@ -5,11 +5,11 @@ version: '3'
|
||||
tasks:
|
||||
docker-build-web:
|
||||
desc: Build the tasknote-web prod-ready docker image, tagging it as candidate
|
||||
cmd: docker build --no-cache --build-arg VITE_BUILD="v999-$(date '+%Y-%m-%d-%H%M%S')" --build-arg SOURCE_PR="v999-123456789-$(date '+%Y-%m-%d-%H%M%S')" -t ghcr.io/rmcampos/tasknote/app:latest ./client
|
||||
cmd: docker build --no-cache --build-arg VITE_BUILD="v999-$(date '+%Y-%m-%d-%H%M%S')" --build-arg SOURCE_PR="v999-123456789-$(date '+%Y-%m-%d-%H%M%S')" -t rmcampos/tasknote-app:latest ./client
|
||||
|
||||
docker-build-api:
|
||||
desc: Build the tasknote-api prod-ready docker image, tagging it as candidate
|
||||
cmd: cd server && mvn -Pnative -DskipTests spring-boot:build-image -Dspring-boot.build-image.imageName=ghcr.io/rmcampos/tasknote/api:latest -Dspring-boot.build-image.builder=paketobuildpacks/builder-jammy-tiny:0.0.505
|
||||
cmd: cd server && mvn -Pnative -DskipTests spring-boot:build-image -Dspring-boot.build-image.imageName=rmcampos/tasknote-api:latest -Dspring-boot.build-image.builder=paketobuildpacks/builder-jammy-tiny:0.0.505
|
||||
|
||||
prod-up-web:
|
||||
desc: Speed up the tasknote-web prod-like image, building it if required
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ LABEL org.opencontainers.image.authors="Ricardo Campos <ricardompcampos@gmail.co
|
||||
org.opencontainers.image.title="TaskNoteApp client" \
|
||||
org.opencontainers.image.description="React Web app application" \
|
||||
org.opencontainers.image.version="${SOURCE_PR}" \
|
||||
org.opencontainers.image.source="https://github.com/ricardo-campos-org/react-typescript-todolist"
|
||||
org.opencontainers.image.source="https://lightroasted.vps-kinghost.net/rmcampos/tasknote"
|
||||
|
||||
# Copy files and run formatting
|
||||
COPY --from=build /app/dist/ /app/dist
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
"node",
|
||||
"nestjs"
|
||||
],
|
||||
"repository": "https://github.com/ricardo-campos-org/react-typescript-todolist",
|
||||
"repository": "https://lightroasted.vps-kinghost.net/rmcampos/tasknote",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@popperjs/core": "^2.11.8",
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
# Must be unique in a given SonarQube instance
|
||||
sonar.projectKey=ricardo-campos-org_react-typescript-todolist_client
|
||||
sonar.organization=ricardo-campos-org
|
||||
|
||||
# This is the name and version displayed in the SonarQube UI.
|
||||
# Was mandatory prior to SonarQube 6.1.
|
||||
sonar.projectName=tasknote-webapp
|
||||
#sonar.projectVersion=1.0
|
||||
|
||||
# Path is relative to the sonar-project.properties file.
|
||||
# Replace "\" by "/" on Windows.
|
||||
# This property is optional if sonar.modules is set.
|
||||
sonar.javascript.lcov.reportPaths=coverage/lcov.info
|
||||
sonar.typescript.tsconfigPaths=tsconfig.json
|
||||
sonar.sources=src/
|
||||
sonar.exclusions=src/__test__/**
|
||||
sonar.tests=src/__test__/
|
||||
sonar.verbose=false
|
||||
|
||||
# Encoding of the source code. Default is default system encoding
|
||||
sonar.sourceEncoding=UTF-8
|
||||
@@ -6,7 +6,7 @@ services:
|
||||
depends_on:
|
||||
tasknote-api:
|
||||
condition: service_healthy
|
||||
image: ghcr.io/rmcampos/tasknote/app:latest
|
||||
image: rmcampos/tasknote-app:latest
|
||||
build:
|
||||
context: ./client
|
||||
dockerfile: Dockerfile
|
||||
@@ -31,7 +31,7 @@ services:
|
||||
SECURITY_KEY: ${SECURITY_KEY}
|
||||
MAILGUN_APIKEY: ${MAILGUN_APIKEY}
|
||||
ports: ["8585:8585"]
|
||||
image: ghcr.io/rmcampos/tasknote/api:latest
|
||||
image: rmcampos/tasknote-api:latest
|
||||
healthcheck:
|
||||
test: ["CMD", "/layers/local_healthcheck/healthcheck/bin/healthcheck"]
|
||||
interval: 10s
|
||||
|
||||
+2
-2
@@ -80,12 +80,12 @@ variable "root_log_level" {
|
||||
|
||||
variable "backend_image" {
|
||||
type = string
|
||||
default = "pull ghcr.io/rmcampos/tasknote/api:15"
|
||||
default = "rmcampos/tasknote-api:latest"
|
||||
}
|
||||
|
||||
variable "frontend_image" {
|
||||
type = string
|
||||
default = "ghcr.io/rmcampos/tasknote/app:app-v2026.03.17.18"
|
||||
default = "rmcampos/tasknote-app:latest"
|
||||
}
|
||||
|
||||
resource "kubernetes_namespace_v1" "tasknote" {
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
|
||||
PR="$1"
|
||||
echo "PR: $PR"
|
||||
|
||||
echo "Getting env vars..."
|
||||
export $(cat .env | xargs)
|
||||
|
||||
docker run -d --rm \
|
||||
--name server \
|
||||
--network=host \
|
||||
-e POSTGRES_DB=$POSTGRES_DB \
|
||||
-e POSTGRES_USER=$POSTGRES_USER \
|
||||
-e POSTGRES_PASSWORD=$POSTGRES_PASSWORD \
|
||||
-e POSTGRES_PORT=$POSTGRES_PORT \
|
||||
-e POSTGRES_HOST=$POSTGRES_HOST \
|
||||
-e CORS_ALLOWED_ORIGINS=$CORS_ALLOWED_ORIGINS \
|
||||
-e SERVER_SERVLET_CONTEXT_PATH=$SERVER_SERVLET_CONTEXT_PATH \
|
||||
-e MAILGUN_APIKEY=$MAILGUN_APIKEY \
|
||||
-e SECURITY_KEY=$SECURITY_KEY \
|
||||
-e BUILD=ghcr.io/ricardo-campos-org/react-typescript-todolist/server:$PR \
|
||||
ghcr.io/ricardo-campos-org/react-typescript-todolist/server:$PR
|
||||
+6
-6
@@ -4,7 +4,7 @@ All kind of tools and useful links and commands can be found here!
|
||||
|
||||
## Links
|
||||
|
||||
- **GitHub Container Registry:** https://ghcr.io/
|
||||
- **Docker Hub Container Registry:** https://hub.docker.io/
|
||||
- **Time tracking:** https://track.toggl.com/timer
|
||||
|
||||
## Building locally
|
||||
@@ -74,7 +74,7 @@ docker run -d -p 8585:8585 --rm \
|
||||
-e POSTGRES_PORT=$POSTGRES_PORT \
|
||||
-e POSTGRES_HOST=$POSTGRES_HOST \
|
||||
-e CORS_ALLOWED_ORIGINS=$CORS_ALLOWED_ORIGINS \
|
||||
ghcr.io/ricardo-campos-org/react-typescript-todolist/tasknote-api:<PR-Number>
|
||||
rmcampos/tasknote-api:<tag>
|
||||
```
|
||||
|
||||
Build Cloud Native: `./mvnw -B package -Pnative -DskipTests`
|
||||
@@ -89,19 +89,19 @@ The frontend app will run on Nginx.
|
||||
|
||||
```
|
||||
export CR_PAT=YOUR_TOKEN
|
||||
echo $CR_PAT | docker login ghcr.io -u RMCampos --password-stdin
|
||||
echo $CR_PAT | docker login -u RMCampos --password-stdin
|
||||
```
|
||||
|
||||
**Pulling images:**
|
||||
|
||||
```sh
|
||||
docker pull ghcr.io/ricardo-campos-org/react-typescript-todolist/tasknote-web:50
|
||||
docker pull ghcr.io/ricardo-campos-org/react-typescript-todolist/tasknote-api:50
|
||||
docker pull rmcampos/tasknote-app:latest
|
||||
docker pull rmcampos/tasknote-api:latest
|
||||
```
|
||||
|
||||
**Pushing images:**
|
||||
```sh
|
||||
docker push ghcr.io/ricardo-campos-org/react-typescript-todolist/tasknote-api:316
|
||||
docker push rmcampos/tasknote-api:latest
|
||||
```
|
||||
|
||||
- Get container IP
|
||||
|
||||
Reference in New Issue
Block a user