sha256:41dcd880f39e3141ff4e5b51806fcbcf59df7a8f77dbe4ac78fda57e080532a3
Last pushed
about 20 hours by joaomlessa
Type
Compose
Manifest digest
sha256:41dcd880f39e3141ff4e5b51806fcbcf59df7a8f77dbe4ac78fda57e080532a3
name: librum-stack
services:
postgres:
image: postgres:16-alpine
container_name: mylibrum-postgres
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-librumDb}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-root}
ports:
- target: 5432
published: "${POSTGRES_PORT:-5433}"
volumes:
- mylibrum-postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 10
backend:
image: joaomlessa/librum-backend:latest
build:
dockerfile_inline: |
FROM maven:3.9.9-eclipse-temurin-21 AS build
ADD https://github.com/Librum-SGB/BACK.git#${BACK_REF:-main} /src
WORKDIR /src/mylibrum
RUN mvn clean package -DskipTests
FROM eclipse-temurin:21-jre
WORKDIR /app
COPY --from=build /src/mylibrum/target/*.jar app.jar
EXPOSE 8184
ENTRYPOINT ["java", "-jar", "app.jar"]
container_name: mylibrum-backend
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/${POSTGRES_DB:-librumDb}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-root}
SPRING_DOCKER_COMPOSE_ENABLED: "false"
JWT_SECRET: ${JWT_SECRET:-bXlsaWJydW0tc2VjcmV0LWtleS1mb3ItZGV2LW9ubHktMzItYnl0ZXM=}
JWT_EXPIRATION_MS: ${JWT_EXPIRATION_MS:-3600000}
APP_FRONTEND_URL: http://localhost:${FRONTEND_PORT:-4200}
ports:
- target: 8184
published: "${BACKEND_PORT:-8184}"
# O front chama a API em http://localhost:8184 (definido no build), então BACKEND_PORT deve permanecer 8184.
frontend:
image: joaomlessa/librum-frontend:latest
build:
dockerfile_inline: |
FROM node:22-alpine AS build
ADD https://github.com/Librum-SGB/FRONT.git#${FRONT_REF:-main} /src
WORKDIR /src/Librum
RUN npm ci
RUN npm run build -- --configuration production
FROM nginx:1.27-alpine
COPY --from=build /src/Librum/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /src/Librum/dist/Librum/browser /usr/share/nginx/html
EXPOSE 80
container_name: mylibrum-frontend
restart: unless-stopped
depends_on:
- backend
ports:
- target: 80
published: "${FRONTEND_PORT:-4200}"
volumes:
mylibrum-postgres-data:
docker compose -f oci://joaomlessa/mylibrum:v1.0 upUse the above command to pull and run the Compose file. Learn more.
The PostgreSQL object-relational database system provides reliability and data integrity.
Pulls
1B+
Stars
15035
Last Updated
about 12 hours