-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
5c19c3b
commit 8b184bd
Showing
5 changed files
with
48 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,14 +6,21 @@ | |
}, | ||
"item": [ | ||
{ | ||
"name": "exclude DB Dump", | ||
"name": "Is pg_dump available", | ||
"event": [ | ||
{ | ||
"listen": "test", | ||
"script": { | ||
"exec": [ | ||
"// ignore Download DB Dump collection", | ||
"postman.setNextRequest(\"invalidateSession\")" | ||
"pm.test(\"HTTP Status code must be 200\", function () {", | ||
" pm.response.to.have.status(200);", | ||
"});", | ||
"", | ||
"pm.test(\"The 'pg_dump' tool must be available\", function () {", | ||
" var jsonData = pm.response.json();", | ||
" pm.expect(jsonData).to.eql(true, \"The 'pg_dump' tool is NOT available\");", | ||
"});", | ||
"" | ||
], | ||
"type": "text/javascript" | ||
} | ||
|
@@ -38,14 +45,15 @@ | |
"method": "GET", | ||
"header": [], | ||
"url": { | ||
"raw": "{{serverURL}}/api/v1/logger", | ||
"raw": "{{serverURL}}/api/v1/maintenance/_pgDumpAvailable", | ||
"host": [ | ||
"{{serverURL}}" | ||
], | ||
"path": [ | ||
"api", | ||
"v1", | ||
"logger" | ||
"maintenance", | ||
"_pgDumpAvailable" | ||
] | ||
} | ||
}, | ||
|
@@ -58,7 +66,7 @@ | |
"listen": "test", | ||
"script": { | ||
"exec": [ | ||
"pm.test(\"Status code should be 200\", function () {", | ||
"pm.test(\"HTTP Status code must be 200\", function () {", | ||
" pm.response.to.have.status(200);", | ||
"});", | ||
"" | ||
|
@@ -100,63 +108,14 @@ | |
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "Is pg_dump available", | ||
"event": [ | ||
{ | ||
"listen": "test", | ||
"script": { | ||
"exec": [ | ||
"pm.test(\"Status code should be 200\", function () {", | ||
" pm.response.to.have.status(200);", | ||
"});", | ||
"" | ||
], | ||
"type": "text/javascript" | ||
} | ||
} | ||
], | ||
"request": { | ||
"auth": { | ||
"type": "basic", | ||
"basic": [ | ||
{ | ||
"key": "username", | ||
"value": "[email protected]", | ||
"type": "string" | ||
}, | ||
{ | ||
"key": "password", | ||
"value": "admin", | ||
"type": "string" | ||
} | ||
] | ||
}, | ||
"method": "GET", | ||
"header": [], | ||
"url": { | ||
"raw": "{{serverURL}}/api/v1/maintenance/_pgDumpAvailable", | ||
"host": [ | ||
"{{serverURL}}" | ||
], | ||
"path": [ | ||
"api", | ||
"v1", | ||
"maintenance", | ||
"_pgDumpAvailable" | ||
] | ||
} | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "invalidateSession", | ||
"event": [ | ||
{ | ||
"listen": "test", | ||
"script": { | ||
"exec": [ | ||
"pm.test(\"Status code is 200\", function () {", | ||
"pm.test(\"HTTP Status code must be 200\", function () {", | ||
" pm.response.to.have.status(200);", | ||
"});" | ||
], | ||
|
@@ -188,11 +147,11 @@ | |
"listen": "test", | ||
"script": { | ||
"exec": [ | ||
"pm.test(\"Status code should be 401\", function () {", | ||
"pm.test(\"HTTP Status code must be 401\", function () {", | ||
" pm.response.to.have.status(401);", | ||
"});", | ||
"", | ||
"pm.test(\"Valid response\", function () {", | ||
"pm.test(\"Expected 'Invalid User' error must be present\", function () {", | ||
" pm.expect(pm.response.text()).to.include(\"Invalid User\");", | ||
"});", | ||
"" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,11 +48,24 @@ RUN find /srv/ -type f -name "*.sh" -exec chmod a+x {} \; && \ | |
mkdir -p /data/local/dotsecure/license && \ | ||
chown -R $USER_NAME:$USER_NAME /data | ||
|
||
# ---------------------------------------------- | ||
# Stage 3: Flatten everything to 1 layer | ||
# ---------------------------------------------- | ||
FROM scratch | ||
|
||
LABEL com.dotcms.contact "[email protected]" | ||
LABEL com.dotcms.vendor "dotCMS LLC" | ||
LABEL com.dotcms.description "dotCMS Content Management System" | ||
|
||
ARG USER_UID="65001" | ||
ARG USER_GID="65001" | ||
|
||
COPY --from=container-base / / | ||
|
||
# Switching to non-root user to install SDKMAN! | ||
USER $USER_UID:$USER_GID | ||
ENV JAVA_HOME="/java" | ||
ENV PATH=$PATH:/java/bin:/usr/local/pgsql/bin | ||
ENV PATH=$PATH:/java/bin | ||
|
||
ENTRYPOINT ["/usr/bin/tini", "--", "/srv/entrypoint.sh"] | ||
CMD ["dotcms"] | ||
|