Hiren122 commited on
Commit
0626c89
·
verified ·
1 Parent(s): 393c544

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -12
Dockerfile CHANGED
@@ -2,23 +2,24 @@ FROM kong/kong-gateway:3.13.0.0
2
 
3
  USER root
4
 
5
- # ---------- Kong DB (Neon DIRECT endpoint) ----------
 
 
 
 
 
 
 
 
 
6
  ENV KONG_DATABASE=postgres \
7
- KONG_PG_HOST=ep-proud-tree-a1vjucw4.ap-southeast-1.aws.neon.tech \
8
- KONG_PG_PORT=5432 \
9
- KONG_PG_DATABASE=neondb \
10
- KONG_PG_USER=neondb_owner \
11
- KONG_PG_PASSWORD=${KONG_PG_PASSWORD} \
12
- KONG_PG_SSL=on \
13
- KONG_PG_SSL_VERIFY=off
14
 
15
- # ---------- Kong Services ----------
16
  ENV KONG_ADMIN_LISTEN=0.0.0.0:8001 \
17
  KONG_ADMIN_GUI_LISTEN=0.0.0.0:8002 \
18
  KONG_ADMIN_GUI_URL=http://localhost:8002 \
19
- KONG_PROXY_LISTEN=0.0.0.0:8000 \
20
- KONG_LOG_LEVEL=info
21
 
22
  EXPOSE 8000 8001 8002
23
 
24
- CMD kong migrations bootstrap || true && kong start
 
2
 
3
  USER root
4
 
5
+ # ---- Upgrade libpq for Neon SNI support ----
6
+ RUN apt-get update && \
7
+ apt-get install -y wget gnupg lsb-release && \
8
+ echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
9
+ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
10
+ apt-get update && \
11
+ apt-get install -y libpq5 libpq-dev && \
12
+ apt-get clean && rm -rf /var/lib/apt/lists/*
13
+
14
+ # ---- Kong DB (Neon DIRECT endpoint) ----
15
  ENV KONG_DATABASE=postgres \
16
+ KONG_PG_URI="postgresql://neondb_owner:${KONG_PG_PASSWORD}@ep-proud-tree-a1vjucw4.ap-southeast-1.aws.neon.tech:5432/neondb?sslmode=require"
 
 
 
 
 
 
17
 
 
18
  ENV KONG_ADMIN_LISTEN=0.0.0.0:8001 \
19
  KONG_ADMIN_GUI_LISTEN=0.0.0.0:8002 \
20
  KONG_ADMIN_GUI_URL=http://localhost:8002 \
21
+ KONG_PROXY_LISTEN=0.0.0.0:8000
 
22
 
23
  EXPOSE 8000 8001 8002
24
 
25
+ CMD kong migrations bootstrap || true && kong start