Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
mghio authored Jul 22, 2022
2 parents 799c84a + 0ca7eb0 commit 6e192b7
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 39 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ Apollo 2.1.0
* [Move apollo-demo, scripts/docker-quick-start and scripts/apollo-on-kubernetes out of main repository](https://github.com/apolloconfig/apollo/pull/4440)
* [Add search key when comparing Configuration items](https://github.com/apolloconfig/apollo/pull/4459)
* [Add a new API to load items with pagination](https://github.com/apolloconfig/apollo/pull/4468)
* [fix(#4474):'openjdk:8-jre-alpine' potentially causing wrong number of cpu cores](https://github.com/apolloconfig/apollo/pull/4475)
------------------
All issues and pull requests are [here](https://github.com/apolloconfig/apollo/milestone/11?closed=1)
20 changes: 7 additions & 13 deletions apollo-adminservice/src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@
# 2. Build with: mvn docker:build -pl apollo-adminservice
# 3. Run with: docker run -p 8090:8090 -e SPRING_DATASOURCE_URL="jdbc:mysql://fill-in-the-correct-server:3306/ApolloConfigDB?characterEncoding=utf8" -e SPRING_DATASOURCE_USERNAME=FillInCorrectUser -e SPRING_DATASOURCE_PASSWORD=FillInCorrectPassword -d -v /tmp/logs:/opt/logs --name apollo-adminservice apolloconfig/apollo-adminservice

FROM openjdk:8-jre-alpine
LABEL maintainer="[email protected];ameizi<[email protected]>"

RUN echo "http://mirrors.aliyun.com/alpine/v3.8/main" > /etc/apk/repositories \
&& echo "http://mirrors.aliyun.com/alpine/v3.8/community" >> /etc/apk/repositories \
&& apk update upgrade \
&& apk add --no-cache unzip
FROM alpine:3.15.5

ARG VERSION
ENV VERSION $VERSION
Expand All @@ -35,16 +29,16 @@ RUN unzip /apollo-adminservice/apollo-adminservice-${VERSION}-github.zip -d /apo
&& rm -rf /apollo-adminservice/apollo-adminservice-${VERSION}-github.zip \
&& chmod +x /apollo-adminservice/scripts/startup.sh

FROM openjdk:8-jre-alpine
LABEL maintainer="[email protected];ameizi<[email protected]>"
FROM openjdk:8-jre-slim
LABEL maintainer="[email protected];[email protected];ameizi<[email protected]>"

ENV APOLLO_RUN_MODE "Docker"
ENV SERVER_PORT 8090

RUN echo "http://mirrors.aliyun.com/alpine/v3.8/main" > /etc/apk/repositories \
&& echo "http://mirrors.aliyun.com/alpine/v3.8/community" >> /etc/apk/repositories \
&& apk update upgrade \
&& apk add --no-cache procps curl bash tzdata \
RUN echo "deb http://mirrors.aliyun.com/debian/ bullseye main non-free contrib" > /etc/apt/sources.list \
&& echo "deb http://mirrors.aliyun.com/debian-security/ bullseye-security main" >> /etc/apt/sources.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends procps curl bash tzdata \
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone

Expand Down
20 changes: 7 additions & 13 deletions apollo-configservice/src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@
# 2. Build with: mvn docker:build -pl apollo-configservice
# 3. Run with: docker run -p 8080:8080 -e SPRING_DATASOURCE_URL="jdbc:mysql://fill-in-the-correct-server:3306/ApolloConfigDB?characterEncoding=utf8" -e SPRING_DATASOURCE_USERNAME=FillInCorrectUser -e SPRING_DATASOURCE_PASSWORD=FillInCorrectPassword -d -v /tmp/logs:/opt/logs --name apollo-configservice apolloconfig/apollo-configservice

FROM openjdk:8-jre-alpine
LABEL maintainer="[email protected];ameizi<[email protected]>"

RUN echo "http://mirrors.aliyun.com/alpine/v3.8/main" > /etc/apk/repositories \
&& echo "http://mirrors.aliyun.com/alpine/v3.8/community" >> /etc/apk/repositories \
&& apk update upgrade \
&& apk add --no-cache unzip
FROM alpine:3.15.5

ARG VERSION
ENV VERSION $VERSION
Expand All @@ -35,16 +29,16 @@ RUN unzip /apollo-configservice/apollo-configservice-${VERSION}-github.zip -d /a
&& rm -rf /apollo-configservice/apollo-configservice-${VERSION}-github.zip \
&& chmod +x /apollo-configservice/scripts/startup.sh

FROM openjdk:8-jre-alpine
LABEL maintainer="[email protected];ameizi<[email protected]>"
FROM openjdk:8-jre-slim
LABEL maintainer="[email protected];[email protected];ameizi<[email protected]>"

ENV APOLLO_RUN_MODE "Docker"
ENV SERVER_PORT 8080

RUN echo "http://mirrors.aliyun.com/alpine/v3.8/main" > /etc/apk/repositories \
&& echo "http://mirrors.aliyun.com/alpine/v3.8/community" >> /etc/apk/repositories \
&& apk update upgrade \
&& apk add --no-cache procps curl bash tzdata \
RUN echo "deb http://mirrors.aliyun.com/debian/ bullseye main non-free contrib" > /etc/apt/sources.list \
&& echo "deb http://mirrors.aliyun.com/debian-security/ bullseye-security main" >> /etc/apt/sources.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends procps curl bash tzdata \
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone

Expand Down
20 changes: 7 additions & 13 deletions apollo-portal/src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@
# 2. Build with: mvn docker:build -pl apollo-portal
# 3. Run with: docker run -p 8070:8070 -e SPRING_DATASOURCE_URL="jdbc:mysql://fill-in-the-correct-server:3306/ApolloPortalDB?characterEncoding=utf8" -e SPRING_DATASOURCE_USERNAME=FillInCorrectUser -e SPRING_DATASOURCE_PASSWORD=FillInCorrectPassword -e APOLLO_PORTAL_ENVS=dev,pro -e DEV_META=http://fill-in-dev-meta-server:8080 -e PRO_META=http://fill-in-pro-meta-server:8080 -d -v /tmp/logs:/opt/logs --name apollo-portal apolloconfig/apollo-portal

FROM openjdk:8-jre-alpine
LABEL maintainer="[email protected];ameizi<[email protected]>"

RUN echo "http://mirrors.aliyun.com/alpine/v3.8/main" > /etc/apk/repositories \
&& echo "http://mirrors.aliyun.com/alpine/v3.8/community" >> /etc/apk/repositories \
&& apk update upgrade \
&& apk add --no-cache unzip
FROM alpine:3.15.5

ARG VERSION
ENV VERSION $VERSION
Expand All @@ -35,16 +29,16 @@ RUN unzip /apollo-portal/apollo-portal-${VERSION}-github.zip -d /apollo-portal \
&& rm -rf /apollo-portal/apollo-portal-${VERSION}-github.zip \
&& chmod +x /apollo-portal/scripts/startup.sh

FROM openjdk:8-jre-alpine
LABEL maintainer="[email protected];ameizi<[email protected]>"
FROM openjdk:8-jre-slim
LABEL maintainer="[email protected];[email protected];ameizi<[email protected]>"

ENV APOLLO_RUN_MODE "Docker"
ENV SERVER_PORT 8070

RUN echo "http://mirrors.aliyun.com/alpine/v3.8/main" > /etc/apk/repositories \
&& echo "http://mirrors.aliyun.com/alpine/v3.8/community" >> /etc/apk/repositories \
&& apk update upgrade \
&& apk add --no-cache procps curl bash tzdata \
RUN echo "deb http://mirrors.aliyun.com/debian/ bullseye main non-free contrib" > /etc/apt/sources.list \
&& echo "deb http://mirrors.aliyun.com/debian-security/ bullseye-security main" >> /etc/apt/sources.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends procps curl bash tzdata \
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@

Use ApolloConfigDB;

-- Begin:Create indexes to solve the problem of updating large tables
ALTER TABLE `Commit` ADD INDEX `idx_IsDeleted_DeletedAt` (`IsDeleted`, `DeletedAt`);
ALTER TABLE `Release` ADD INDEX `idx_IsDeleted_DeletedAt` (`IsDeleted`, `DeletedAt`);

-- the follow DML won't change the `DataChange_LastTime` field
UPDATE `AccessKey` SET `DeletedAt` = -Id, `DataChange_LastTime` = `DataChange_LastTime` WHERE `IsDeleted` = 1 and `DeletedAt` = 0;
UPDATE `App` SET `DeletedAt` = -Id, `DataChange_LastTime` = `DataChange_LastTime` WHERE `IsDeleted` = 1 and `DeletedAt` = 0;
Expand Down Expand Up @@ -74,3 +78,7 @@ ALTER TABLE `Release`
ALTER TABLE `ServerConfig`
ADD UNIQUE INDEX `UK_Key_Cluster_DeletedAt` (`Key`,`Cluster`,`DeletedAt`),
DROP INDEX `IX_Key`;

-- End:Delete temporarily created indexes
ALTER TABLE `Commit` DROP INDEX `idx_IsDeleted_DeletedAt`;
ALTER TABLE `Release` DROP INDEX `idx_IsDeleted_DeletedAt`;

0 comments on commit 6e192b7

Please sign in to comment.