Re: [PR] Deployment Automation [roller]
snoopdave (via GitHub) <[email protected]> Sun, 08 Sep 2024 19:18:28 -0000
| Newsgroups | gmane.comp.java.roller.devel |
|---|---|
| Message-ID | <PR_kwDOAAMmdM56Zxop-d847e707-7b30-4b7c-b22d-a38015daa7a8@gitbox.apache.org> |
snoopdave commented on code in PR #137:
URL: https://github.com/apache/roller/pull/137#discussion_r1749330723
##########
.vagrant/machines/default/virtualbox/private_key:
##########
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
Review Comment:
Seems like a bad practice to include private keys in our repo.
##########
docker-compose.yml:
##########
@@ -1,47 +1,25 @@
-
Review Comment:
Why does this PR remove the license header? Also, any new files shiould include the license header.
##########
.vagrant/rgloader/loader.rb:
##########
@@ -0,0 +1,9 @@
+# This file loads the proper rgloader/loader.rb file that comes packaged
Review Comment:
Why is anything related to Vagrant in this PR, we've got Docker and docker-compose already why do we need Vagrant?
##########
Vagrantfile:
##########
@@ -0,0 +1,99 @@
+# -*- mode: ruby -*-
Review Comment:
again, why do we need Vagrant when we have Docker and Docker compose?
##########
.vagrant/machines/default/virtualbox/action_provision:
##########
@@ -0,0 +1 @@
+1.5:a1cf4c44-6035-470e-b080-fd4088b2dc79
Review Comment:
I don't understand why any of the changes under `.vagrant` are necessary in this PR.
##########
Dockerfile:
##########
@@ -21,65 +21,65 @@
# STAGE 1 - BUILD ------------------------------------------------
-FROM maven:3-openjdk-17-slim as builder
-
-COPY ./docker /project/docker
-
-# Build Apache Roller
-
-WORKDIR /tmp
-RUN apt-get update && apt-get install -y git
-RUN git clone https://github.com/apache/roller.git
-WORKDIR /tmp/roller
-# change to branch/tag you prefer
-RUN git checkout tags/roller-6.1.0; \
-mvn -Duser.home=/builder/home -DskipTests=true -B clean install
-
-
-# STAGE 2 - PACKAGE ------------------------------------------------
-
-FROM tomcat:9-jdk17-openjdk-slim
-
-# Remove existing Tomcat webapps
-
-RUN rm -rf /usr/local/tomcat/webapps/*
-
-# Add Roller configuration to environment
-
-ARG STORAGE_ROOT=/usr/local/tomcat/data
-ARG DATABASE_JDBC_DRIVERCLASS=org.postgresql.Driver
-ARG DATABASE_JDBC_CONNECTIONURL=jdbc:postgresql://postgresql/rollerdb
-ARG DATABASE_JDBC_USERNAME=scott
-ARG DATABASE_JDBC_PASSWORD=tiger
-ARG DATABASE_HOST=postgresql:5434
-
-ENV STORAGE_ROOT ${STORAGE_ROOT}
-ENV DATABASE_JDBC_DRIVERCLASS ${DATABASE_JDBC_DRIVERCLASS}
-ENV DATABASE_JDBC_CONNECTIONURL ${DATABASE_JDBC_CONNECTIONURL}
-ENV DATABASE_JDBC_USERNAME ${DATABASE_JDBC_USERNAME}
-ENV DATABASE_JDBC_PASSWORD ${DATABASE_JDBC_PASSWORD}
-ENV DATABASE_HOST ${DATABASE_HOST}
-
-# install Roller WAR as ROOT.war, create data dirs
-
-WORKDIR /usr/local/roller
-COPY --from=builder /tmp/roller/app/target/roller.war /usr/local/tomcat/webapps/ROOT.war
-RUN mkdir -p data/mediafiles data/searchindex
-
-# download PostgreSQL and MySQL drivers plus Mail and Activation JARs
-
-WORKDIR /usr/local/tomcat/lib
-RUN apt-get update && apt-get install -y wget
-RUN wget -O postgresql.jar https://jdbc.postgresql.org/download/postgresql-42.3.1.jar
-RUN wget https://repo1.maven.org/maven2/javax/mail/mail/1.4.7/mail-1.4.7.jar
-#RUN wget https://repo1.maven.org/maven2/javax/activation/activation/1.1.1/activation-1.1.1.jar
-
-# Add Roller entry-point and go!
-
-COPY --from=builder /project/docker/entry-point.sh /usr/local/tomcat/bin
-COPY --from=builder /project/docker/wait-for-it.sh /usr/local/tomcat/bin
-RUN chgrp -R 0 /usr/local/tomcat
-RUN chmod -R g+rw /usr/local/tomcat
-
-WORKDIR /usr/local/tomcat
-CMD [ "/usr/local/tomcat/bin/entry-point.sh" ]
+ FROM maven:3-openjdk-17-slim as builder
Review Comment:
Formatting changes should not be included in PRs, only changes essential to the PR.
##########
docker-compose.yml:
##########
@@ -1,47 +1,25 @@
-
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. The ASF licenses this file to You
-# under the Apache License, Version 2.0 (the "License"); you may not
-# use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License. For additional information regarding
-# copyright in this work, please see the NOTICE file in the top level
-# directory of this distribution.
-
-
-# Example Docker Compose setup for running Roller and PostgreSQL locally
-
-
-version: '3.7'
-
services:
- postgresql:
- image: "postgres:10.0"
- ports:
- - "5432:5432"
- volumes:
- - type: bind
- source: ./docker/postgresql-data
- target: /var/lib/postgresql/data
- environment:
- - POSTGRES_DB=rollerdb
- - POSTGRES_USER=scott
- - POSTGRES_PASSWORD=tiger
-
- roller:
- build: .
- ports:
- - "8080:8080"
- volumes:
- - type: bind
- source: ./docker/roller-data
- target: /var/lib/roller/data
-
+ postgresql:
+ image: "postgres:10.0"
+ ports:
+ - "5432:5432"
+ volumes:
+ - type: bind
+ source: C:/roller/docker/postgresql-data
Review Comment:
Is there no way to specify a Docker file like this without OS specific paths like this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]