Skip to content

Feature/docker config update#19

Merged
kAYI0019 merged 5 commits into
developfrom
feature/docker-config-update
Aug 18, 2025
Merged

Feature/docker config update#19
kAYI0019 merged 5 commits into
developfrom
feature/docker-config-update

Conversation

@kAYI0019

Copy link
Copy Markdown
Member

Overview

Update Docker and application configurations and add Admin UI to ensure smooth service setup and proper connections between services.

Key Changes

  • Remove initialization SQL path from docker-compose.yml
  • Update OLLAMA environment variables
  • Add Admin UI service with multi-stage Dockerfile and .dockerignore
  • Change JPA settings in application-docker.yml
  • Add Flyway and Elasticsearch configurations
  • Modify Ollama and Unstructured API settings (unstructured.base-urlapp.unstructured.api.url)
  • Enable CORS for all paths and allow all HTTP methods
  • Remove Docker-specific settings from application.yml

- remove initialization SQL path
- update OLLAMA environment variables
- add new Admin UI service
- change JPA settings
- add Flyway and Elasticsearch configurations
- update Ollama and Unstructured API settings
- Create multi-stage Dockerfile for admin UI
- Add .dockerignore to exclude unnecessary files
- Enable CORS for all paths
- Allow all HTTP methods
- Remove Docker profile and related configurations for database, Elasticsearch, Ollama, MinIO, and Unstructured.io

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors Docker configuration to improve service setup and connectivity by removing environment variable overrides from docker-compose.yml and consolidating configuration into profile-specific files. The changes introduce a new Admin UI service and update application configuration structure.

  • Remove environment variable duplication by leveraging Spring profiles instead of docker-compose overrides
  • Add Admin UI service with multi-stage Docker build for production optimization
  • Update JPA settings from create-drop to validate and add Flyway migration support

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
docker-compose.yml Remove init SQL volume mount, environment variable overrides, and add Admin UI service
core/src/main/resources/application.yml Remove Docker-specific configuration block (moved to docker profile)
core/src/main/resources/application-docker.yml Update JPA settings, add Flyway config, and restructure application properties
core/src/main/java/com/opencontext/config/WebConfig.java Expand CORS to allow all paths and HTTP methods
admin-ui/Dockerfile Add multi-stage build with Node.js for production deployment
admin-ui/.dockerignore Add standard Node.js exclusions for Docker builds

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread docker-compose.yml Outdated
jpa:
hibernate:
ddl-auto: create-drop
ddl-auto: validate

Copilot AI Aug 18, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing from 'create-drop' to 'validate' requires existing database schema to match entity definitions. This change should be coordinated with proper database migration strategy to avoid runtime failures.

Suggested change
ddl-auto: validate
ddl-auto: none

Copilot uses AI. Check for mistakes.
.allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS","PATCH")
registry.addMapping("/**")
.allowedOriginPatterns("*")
.allowedMethods("*")

Copilot AI Aug 18, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allowing all HTTP methods (*) in CORS configuration may expose unintended endpoints to cross-origin requests. Consider explicitly listing only the required methods (GET, POST, PUT, DELETE, OPTIONS, PATCH).

Suggested change
.allowedMethods("*")
.allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH")

Copilot uses AI. Check for mistakes.
Comment thread admin-ui/Dockerfile
EXPOSE 80

# Start serve with SPA support
CMD ["serve", "-s", "dist", "-l", "80", "--single"]

Copilot AI Aug 18, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The production stage uses a full Node.js image but only needs the 'serve' package. Consider using a lighter base image like nginx:alpine for better security and smaller image size.

Suggested change
CMD ["serve", "-s", "dist", "-l", "80", "--single"]
FROM nginx:alpine
# Copy built files from builder stage to nginx's static directory
COPY --from=builder /app/dist /usr/share/nginx/html
# Expose port 80
EXPOSE 80

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@kAYI0019
kAYI0019 merged commit 3835916 into develop Aug 18, 2025
@Yoo-SH Yoo-SH mentioned this pull request Aug 21, 2025
53 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants