Skip to content

Commit 91b127f

Browse files
committed
Fix Dockerfile
1 parent 39d821f commit 91b127f

File tree

5 files changed

+33
-27
lines changed

5 files changed

+33
-27
lines changed

Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM python:3.10-alpine
2+
3+
RUN apk update \
4+
&& apk add --no-cache --virtual .build-deps git g++ postgresql-dev yaml-dev \
5+
&& apk add --no-cache libpq
6+
7+
WORKDIR /var/src/lnt
8+
9+
COPY requirements.server.txt setup.py .
10+
# setup.py uses lnt.__version__ etc.
11+
COPY lnt/__init__.py lnt/__init__.py
12+
# we build the cperf extension during install
13+
COPY lnt/testing/profile lnt/testing/profile
14+
15+
RUN pip3 install -r requirements.server.txt \
16+
&& apk --purge del .build-deps \
17+
&& mkdir /var/log/lnt
18+
19+
COPY . .
20+
COPY docker/docker-entrypoint.sh docker/wait_db /usr/local/bin/
21+
22+
VOLUME /var/log
23+
24+
EXPOSE 8000
25+
26+
ENV DB_ENGINE= DB_HOST= DB_USER= DB_PWD= DB_BASE=
27+
28+
ENTRYPOINT docker-entrypoint.sh
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ services:
2121

2222
db:
2323
container_name: lnt-postgres
24-
image: postgres:11-alpine
24+
image: docker.io/postgres:13-alpine
2525
environment:
2626
- POSTGRES_PASSWORD=${DB_PWD}
27-
- POSTGRES_USER=${DB_USER}
28-
- POSTGRES_DB=${DB_BASE}
27+
- POSTGRES_USER=${DB_USER:-lntuser}
28+
- POSTGRES_DB=${DB_BASE:-lnt}

docker/.env

Lines changed: 0 additions & 2 deletions
This file was deleted.

docker/Dockerfile

Lines changed: 0 additions & 20 deletions
This file was deleted.

requirements.server.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
.
33
psycopg2==2.9.10
44
gunicorn==19.9.0
5-
Jinja2==3.1.6
5+
Jinja2==2.11.3
66
progressbar2
7-
pyyaml==6.0
7+
pyyaml==5.1.2

0 commit comments

Comments
 (0)