Skip to content

Commit

Permalink
Convert backend to use alpine to get libssl3 (#1198)
Browse files Browse the repository at this point in the history
* convert backend Dockerfile to use alpine to get libssl3

* alpine requires using newer remote docker
  • Loading branch information
mipyykko authored May 29, 2023
1 parent daa33e3 commit b9fcaea
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 13 deletions.
2 changes: 0 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ jobs:
steps:
- checkout
- setup_remote_docker:
version: 19.03.13
docker_layer_caching: true
- jq/install
- docker/install-docker-tools:
Expand Down Expand Up @@ -230,7 +229,6 @@ jobs:
- attach_workspace:
at: ~/project
- setup_remote_docker:
version: 19.03.13
docker_layer_caching: true
- run:
name: "Restore image"
Expand Down
8 changes: 4 additions & 4 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM node:18.16.0-buster
FROM node:18.16.0-alpine

RUN apk update && \
apk add --no-cache build-base libpng-dev postgresql-client libpq redis git jq bash python3

RUN apt-get update \
&& apt-get install -yy build-essential libpng-dev postgresql-client libpq-dev redis-tools git jq \
&& rm -rf /var/lib/apt/lists/*
RUN wget https://github.com/edenhill/librdkafka/archive/v2.0.2.tar.gz -O - | tar -xz \
&& cd librdkafka-2.0.2 \
&& ./configure --prefix=/usr \
Expand Down
3 changes: 2 additions & 1 deletion backend/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ const logger = winston.createLogger({
transports: [new winston.transports.Console()],
})

const ctx: ServerContext = { prisma, logger, knex }

const startApp = async () => {
const ctx: ServerContext = { prisma, logger, knex }
const { httpServer } = await server(ctx)

attachPrismaEvents(ctx)
Expand Down
2 changes: 1 addition & 1 deletion backend/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const DATABASE_URL =
? "postgres://prisma:prisma@localhost:5678/testing"
: process.env.DATABASE_URL

const url = new URL(DATABASE_URL || "")
const url = new URL((DATABASE_URL || "").replaceAll('"', ""))
url.searchParams.delete("schema")

export const DATABASE_URL_WITHOUT_SCHEMA = url.href
Expand Down
2 changes: 1 addition & 1 deletion backend/graphql/Completion/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// generated Fri May 26 2023 13:59:17 GMT+0300 (Itä-Euroopan kesäaika)
// generated Fri May 26 2023 14:24:46 GMT+0300 (Itä-Euroopan kesäaika)

export * from "./input"
export * from "./model"
Expand Down
2 changes: 1 addition & 1 deletion backend/graphql/Course/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// generated Fri May 26 2023 13:59:17 GMT+0300 (Itä-Euroopan kesäaika)
// generated Fri May 26 2023 14:24:46 GMT+0300 (Itä-Euroopan kesäaika)

export * from "./input"
export * from "./model"
Expand Down
2 changes: 1 addition & 1 deletion backend/graphql/StudyModule/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// generated Fri May 26 2023 13:59:17 GMT+0300 (Itä-Euroopan kesäaika)
// generated Fri May 26 2023 14:24:46 GMT+0300 (Itä-Euroopan kesäaika)

export * from "./input"
export * from "./model"
Expand Down
2 changes: 1 addition & 1 deletion backend/graphql/User/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// generated Fri May 26 2023 13:59:17 GMT+0300 (Itä-Euroopan kesäaika)
// generated Fri May 26 2023 14:24:46 GMT+0300 (Itä-Euroopan kesäaika)

export * from "./input"
export * from "./model"
Expand Down
2 changes: 1 addition & 1 deletion backend/graphql/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// generated Fri May 26 2023 13:59:17 GMT+0300 (Itä-Euroopan kesäaika)
// generated Fri May 26 2023 14:24:46 GMT+0300 (Itä-Euroopan kesäaika)

export * from "./ABEnrollment"
export * from "./ABStudy"
Expand Down

0 comments on commit b9fcaea

Please sign in to comment.