mirror of
https://git.victorphan.net/basketballcantho/Teedy_custom.git
synced 2026-08-05 05:53:12 +07:00
update docker build và docker compose
This commit is contained in:
+13
-28
@@ -1,3 +1,10 @@
|
||||
# Stage 1: Build the application
|
||||
FROM maven:3.8.6-openjdk-11 AS build
|
||||
COPY . /usr/src/app
|
||||
WORKDIR /usr/src/app
|
||||
RUN mvn clean package -DskipTests -pl docs-web -am
|
||||
|
||||
# Stage 2: Runtime environment
|
||||
FROM ubuntu:22.04
|
||||
LABEL maintainer="b.gamard@sismics.com"
|
||||
|
||||
@@ -19,33 +26,9 @@ RUN apt-get update && \
|
||||
ffmpeg \
|
||||
mediainfo \
|
||||
tesseract-ocr \
|
||||
tesseract-ocr-ara \
|
||||
tesseract-ocr-ces \
|
||||
tesseract-ocr-chi-sim \
|
||||
tesseract-ocr-chi-tra \
|
||||
tesseract-ocr-dan \
|
||||
tesseract-ocr-deu \
|
||||
tesseract-ocr-fin \
|
||||
tesseract-ocr-fra \
|
||||
tesseract-ocr-heb \
|
||||
tesseract-ocr-hin \
|
||||
tesseract-ocr-hun \
|
||||
tesseract-ocr-ita \
|
||||
tesseract-ocr-jpn \
|
||||
tesseract-ocr-kor \
|
||||
tesseract-ocr-lav \
|
||||
tesseract-ocr-nld \
|
||||
tesseract-ocr-nor \
|
||||
tesseract-ocr-pol \
|
||||
tesseract-ocr-por \
|
||||
tesseract-ocr-rus \
|
||||
tesseract-ocr-spa \
|
||||
tesseract-ocr-swe \
|
||||
tesseract-ocr-tha \
|
||||
tesseract-ocr-tur \
|
||||
tesseract-ocr-ukr \
|
||||
tesseract-ocr-vie \
|
||||
tesseract-ocr-sqi \
|
||||
tesseract-ocr-fra \
|
||||
tesseract-ocr-eng \
|
||||
&& apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
RUN dpkg-reconfigure -f noninteractive tzdata
|
||||
@@ -67,9 +50,11 @@ RUN mkdir /app && \
|
||||
cd /app && \
|
||||
java -jar /opt/jetty/start.jar --add-modules=server,http,webapp,deploy
|
||||
|
||||
ADD docs.xml /app/webapps/docs.xml
|
||||
ADD docs-web/target/docs-web-*.war /app/webapps/docs.war
|
||||
# Copy build artifacts from Stage 1
|
||||
COPY --from=build /usr/src/app/docs.xml /app/webapps/docs.xml
|
||||
COPY --from=build /usr/src/app/docs-web/target/docs-web-*.war /app/webapps/docs.war
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
CMD ["java", "-jar", "/opt/jetty/start.jar"]
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
version: '3'
|
||||
services:
|
||||
teedy:
|
||||
image: ghcr.io/victorphan03/teedy-custom:v1.0.0
|
||||
container_name: teedy-custom
|
||||
restart: always
|
||||
ports:
|
||||
- "8080:8080"
|
||||
environment:
|
||||
# URL cơ sở của bạn (ví dụ: http://localhost:8080)
|
||||
- DOCS_BASE_URL=http://localhost:8080
|
||||
# Tùy chỉnh bộ nhớ Java nếu cần
|
||||
- JAVA_OPTIONS=-Dfile.encoding=UTF-8 -Xmx1g
|
||||
volumes:
|
||||
# Lưu trữ cơ sở dữ liệu và các file PDF tại đây
|
||||
- ./teedy-data:/data
|
||||
|
||||
# Hướng dẫn chạy:
|
||||
# 1. Thay YOUR_GITHUB_USERNAME bằng tên GitHub của bạn.
|
||||
# 2. Chạy lệnh: docker-compose -f docker-compose-ghcr.yml up -d
|
||||
Reference in New Issue
Block a user