Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/src/main/docker/Dockerfile.jvm
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ COPY --chown=185 target/quarkus-app/*.jar /deployments/
COPY --chown=185 target/quarkus-app/app/ /deployments/app/
COPY --chown=185 target/quarkus-app/quarkus/ /deployments/quarkus/

EXPOSE 8080
EXPOSE 8081
USER 185
ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"
Expand Down
18 changes: 18 additions & 0 deletions docker-compose.app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
services:
backend:
build:
context: ./backend
dockerfile: src/main/docker/Dockerfile.jvm
image: quarkus-backend
environment:
- QUARKUS_DATASOURCE_JDBC_URL=jdbc:postgresql://host.docker.internal:5432/quarkus
- QUARKUS_FLYWAY_SCHEMAS=quarkus
#- OLLAMA_HOST=http://host.docker.internal:11434

frontend:
build:
context: ./frontend
dockerfile: Dockerfile
image: vite-frontend
ports:
- "8082:80"
10 changes: 10 additions & 0 deletions docker-compose.auth.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
services:
keycloak:
image: quay.io/keycloak/keycloak:26.0
environment:
KC_BOOTSTRAP_ADMIN_USERNAME: admin
KC_BOOTSTRAP_ADMIN_PASSWORD: admin
KC_LOG_LEVEL: info
command: start-dev
ports:
- "8081:8080"
20 changes: 20 additions & 0 deletions docker-compose.db.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
services:
postgres:
image: postgres:15.1
restart: always
volumes:
- db-data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=quarkus
- POSTGRES_PASSWORD=quarkus
healthcheck:
test: ["CMD-SHELL", "pg_isready -U quarkus"]
interval: 5s
timeout: 5s
retries: 6
ports:
- "5432:5432"

volumes:
db-data:
driver: local
12 changes: 12 additions & 0 deletions docker-compose.ollama.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
services:
ollama:
image: ollama/ollama:0.30.0-rc28-rocm
container_name: ollama
ports:
- "11434:11434"
volumes:
- ollama_data:/root/.ollama

volumes:
ollama_data:
name: ollama_data
67 changes: 42 additions & 25 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,43 @@
services:
quarkus-app:
backend:
build:
context: ./backend
dockerfile: src/main/docker/Dockerfile.jvm
image: quarkus-backend
environment:
- QUARKUS_DATASOURCE_JDBC_URL=jdbc:postgresql://quarkus-db:5432/quarkus
- QUARKUS_DATASOURCE_JDBC_URL=jdbc:postgresql://postgres:5432/quarkus
- QUARKUS_FLYWAY_SCHEMAS=quarkus
- OLLAMA_HOST=http://host.docker.internal:11434
networks:
- app-network

frontend:
build:
context: ./frontend
dockerfile: Dockerfile
image: vite-frontend
ports:
- "8082:80"
networks:
- app-network

keycloak:
image: quay.io/keycloak/keycloak:26.0
environment:
KC_BOOTSTRAP_ADMIN_USERNAME: admin
KC_BOOTSTRAP_ADMIN_PASSWORD: admin
KC_LOG_LEVEL: info
KC_HOSTNAME: localhost
KC_HOSTNAME_PORT: 80
KC_HOSTNAME_STRICT: false
KC_PROXY: edge

command: start-dev --http-port=8083
ports:
- "8080:8080" # the HTTP endpoint
depends_on:
quarkus-db:
condition: service_healthy
- "8083:8083"
networks:
- quarkus
- app-network

quarkus-db:
postgres:
image: postgres:15.1
restart: always
volumes:
Expand All @@ -32,28 +53,24 @@ services:
ports:
- "5432:5432"
networks:
- quarkus
- app-network

ollama:
image: ollama/ollama:0.5.13
image: ollama/ollama:0.30.0-rc28-rocm
container_name: ollama
restart: unless-stopped
pull_policy: always
tty: true
volumes:
- ~/root/.ollama:/root/.ollama
- ./entrypoint.sh:/entrypoint.sh
ports:
- 11434:11434
- "11434:11434"
volumes:
- ollama_data:/root/.ollama
networks:
- quarkus
entrypoint: [ "/usr/bin/bash", "/entrypoint.sh" ]
env_file: "./backend/.env"

networks:
quarkus:
driver: bridge
- app-network

volumes:
db-data:
driver: local
ollama_data:
name: ollama_data

networks:
app-network:
driver: bridge
18 changes: 18 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM node:20-alpine AS builder

WORKDIR /app

COPY package*.json ./
RUN npm ci

COPY . .

RUN npm run build

FROM nginx:alpine

COPY --from=builder /app/build /usr/share/nginx/html

COPY nginx.conf /etc/nginx/conf.d/default.conf

EXPOSE 80
19 changes: 19 additions & 0 deletions frontend/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
server {
listen 80;

root /usr/share/nginx/html;
index index.html;

location / {
try_files $uri $uri/ /index.html;
}

location /api/ {
proxy_pass http://backend:8081/api/;
}

location /auth/ {
proxy_pass http://keycloak:8080/;
}

}
2 changes: 1 addition & 1 deletion frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Route } from "wouter";
import CalendarView from "./components/calendar";
import Header from "./components/misc/header";
import Sidebar from "./components/misc/sidebar";
import Todos from "./components/todos/todos";
import Todos from "./components/Todos/Todos";
import { MainContext } from "./provider/mainProvider";

function App() {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Todos/Todos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import AddTodo from "../dialogs/todo/addTodo";
import EditTodoList from "../dialogs/todoList/editTodoList";
import { FilterMenu, SelectedFilterE } from "../menus/filterMenu";
import { SelectedSortE, SelectedSortOrderE, SortMenu } from "../menus/sortMenu";
import Todo from "./todo";
import Todo from "./Todo";

const Todos = () => {
const { taskLists, editTodoList } = useContext(TodoListContext)!;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render } from "react-dom";
import App from "./app";
import App from "./App";
import { DeleteConfirmProvider } from "./provider/deleteConfirmProvider";
import { MainProvider } from "./provider/mainProvider";
import { ThemeProvider } from "./provider/themeProvider";
Expand Down
Loading