Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Default Credentials #22

Merged
merged 3 commits into from
Jan 8, 2025
Merged
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
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ The JPO ITS utilities repository serves as a central location for deploying open
- [Configuration](#configuration)
- [Configure Kafka Connector Creation](#configure-kafka-connector-creation)
- [Quick Run](#quick-run-2)
- [5. Deduplicator](#5-jpo-Deduplicator)
- [Deduplication Configuration](#deduplication-config)
- [Github Token Generation](#generate-a-github-token)
- [5. jpo-deduplicator](#5-jpo-deduplicator)
- [Deduplication Config](#deduplication-config)
- [Generate a Github Token](#generate-a-github-token)
- [Quick Run](#quick-run-3)
- [Security Notice](#security-notice)


<a name="base-configuration"></a>
Expand Down Expand Up @@ -256,3 +257,12 @@ For local development the following steps are also required
4. You should now see only one copy of the map message sent.

[Back to top](#toc)

## Security Notice

While default passwords are provided for development convenience, it is **strongly recommended** to:

1. Change all passwords before deploying to any environment
2. Never use default passwords in production
3. Use secure password generation and management practices
4. Consider using Docker secrets or environment management tools for production deployments
11 changes: 4 additions & 7 deletions docker-compose-deduplicator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,21 @@ services:
context: jpo-deduplicator
dockerfile: Dockerfile
args:
MAVEN_GITHUB_TOKEN: ${MAVEN_GITHUB_TOKEN:?error}
MAVEN_GITHUB_ORG: ${MAVEN_GITHUB_ORG:?error}
MAVEN_GITHUB_TOKEN: ${MAVEN_GITHUB_TOKEN}
MAVEN_GITHUB_ORG: ${MAVEN_GITHUB_ORG}
image: jpo-deduplicator:latest
restart: ${RESTART_POLICY}
environment:
DOCKER_HOST_IP: ${DOCKER_HOST_IP}
KAFKA_BOOTSTRAP_SERVERS: ${KAFKA_BOOTSTRAP_SERVERS:?error}
spring.kafka.bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVERS:?error}
KAFKA_BOOTSTRAP_SERVERS: ${KAFKA_BOOTSTRAP_SERVERS}
spring.kafka.bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVERS}
enableProcessedMapDeduplication: ${ENABLE_PROCESSED_MAP_DEDUPLICATION}
enableProcessedMapWktDeduplication: ${ENABLE_PROCESSED_MAP_WKT_DEDUPLICATION}
enableOdeMapDeduplication: ${ENABLE_ODE_MAP_DEDUPLICATION}
enableOdeTimDeduplication: ${ENABLE_ODE_TIM_DEDUPLICATION}
enableOdeRawEncodedTimDeduplication: ${ENABLE_ODE_RAW_ENCODED_TIM_DEDUPLICATION}
enableProcessedSpatDeduplication: ${ENABLE_PROCESSED_SPAT_DEDUPLICATION}
enableOdeBsmDeduplication: ${ENABLE_ODE_BSM_DEDUPLICATION}



healthcheck:
test: ["CMD", "java", "-version"]
interval: 10s
Expand Down
13 changes: 2 additions & 11 deletions jpo-deduplicator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,8 @@ ARG MAVEN_GITHUB_ORG
ENV MAVEN_GITHUB_TOKEN=$MAVEN_GITHUB_TOKEN
ENV MAVEN_GITHUB_ORG=$MAVEN_GITHUB_ORG

# COPY ./jpo-conflictmonitor/pom.xml ./jpo-conflictmonitor/
# COPY ./settings.xml ./jpo-conflictmonitor/

# # Copy and Build Conflict Monitor
# # Download dependencies alone to cache them first
# WORKDIR /home/jpo-conflictmonitor
# RUN mvn -s settings.xml dependency:resolve

# # Copy the source code and build the conflict monitor
# COPY ./jpo-conflictmonitor/src ./src
# RUN mvn -s settings.xml install -DskipTests -Ppackage-jar
RUN test -n "$MAVEN_GITHUB_TOKEN" || (echo "Error: MAVEN_GITHUB_TOKEN cannot be empty" && exit 1)
RUN test -n "$MAVEN_GITHUB_ORG" || (echo "Error: MAVEN_GITHUB_ORG cannot be empty" && exit 1)

# Copy and Build Deduplicator
WORKDIR /home
Expand Down
10 changes: 5 additions & 5 deletions sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,19 @@ MONGO_DB_NAME=CV

# Generate a random string for the MongoDB keyfile using the following command:
# $ openssl rand -base64 32
MONGO_DB_KEYFILE_STRING=
MONGO_DB_KEYFILE_STRING=replace_me

MONGO_ADMIN_DB_USER=admin
MONGO_ADMIN_DB_PASS=
MONGO_ADMIN_DB_PASS=replace_me

MONGO_READ_WRITE_USER=ode
MONGO_READ_WRITE_PASS=
MONGO_READ_WRITE_PASS=replace_me

MONGO_READ_USER=user
MONGO_READ_PASS=
MONGO_READ_PASS=replace_me

MONGO_EXPORTER_USERNAME=export
MONGO_EXPORTER_PASSWORD=
MONGO_EXPORTER_PASSWORD=replace_me

MONGO_EXPRESS_USER=${MONGO_ADMIN_DB_USER}
MONGO_EXPRESS_PASS=${MONGO_ADMIN_DB_PASS}
Expand Down
Loading