1
0
Fork 0
mirror of synced 2024-07-03 21:40:55 +12:00

Add pg_dump to server dockerfile

This commit is contained in:
Adria Navarro 2023-06-22 11:13:20 +01:00
parent 6b049cbcda
commit a5ae0e5a3f
2 changed files with 17 additions and 4 deletions

View file

@ -18,7 +18,7 @@ ENV TOP_LEVEL_PATH=/
# handle node-gyp
RUN apt-get update \
&& apt-get install -y --no-install-recommends g++ make python postgresql-client
&& apt-get install -y --no-install-recommends g++ make python
RUN yarn global add pm2
# Install client for oracle datasource
@ -26,6 +26,16 @@ RUN apt-get install unzip libaio1
COPY scripts/integrations/oracle/ scripts/integrations/oracle/
RUN /bin/bash -e scripts/integrations/oracle/instantclient/linux/x86-64/install.sh
# Add the PostgreSQL repository
RUN apt update && apt upgrade -y \
&& apt install software-properties-common apt-transport-https curl gpg -y \
&& curl -fsSl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /usr/share/keyrings/postgresql.gpg > /dev/null \
&& echo deb [arch=amd64,arm64,ppc64el signed-by=/usr/share/keyrings/postgresql.gpg] http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main | tee /etc/apt/sources.list.d/postgresql.list \
&& apt update -y \
&& apt install postgresql-client-15 -y \
&& apt remove software-properties-common apt-transport-https curl gpg -y
COPY package.json .
COPY dist/yarn.lock .
RUN yarn install --production=true

View file

@ -229,10 +229,13 @@ describe("getExternalSchema", () => {
it("does not export a data", async () => {
const integration = new postgres.integration(config)
await integration.internalQuery({
sql: `INSERT INTO "users" ("name", "role") VALUES ('John Doe', 'Administrator');
await integration.internalQuery(
{
sql: `INSERT INTO "users" ("name", "role") VALUES ('John Doe', 'Administrator');
INSERT INTO "products" ("name", "price") VALUES ('Book', 7.68);`,
})
},
false
)
const result = await integration.getExternalSchema()
expect(result).toMatchInlineSnapshot(`