Skip to content

Commit 282695a

Browse files
committed
nginx ports problem fix
1 parent 7aa5bed commit 282695a

4 files changed

Lines changed: 11 additions & 41 deletions

File tree

Dockerfile

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1 @@
11
FROM python:3.11
2-
3-
RUN apt update --no-install-recommends -y
4-
5-
ENV PYTHONFAULTHANDLER=1 \
6-
PYTHONUNBUFFERED=1 \
7-
PYTHONHASHSEED=random \
8-
PIP_NO_CACHE_DIR=off \
9-
PIP_DISABLE_PIP_VERSION_CHECK=on \
10-
PIP_DEFAULT_TIMEOUT=100 \
11-
POETRY_VERSION=1.2.2
12-
13-
RUN pip install "poetry==$POETRY_VERSION"
14-
15-
RUN mkdir /procollab
16-
17-
WORKDIR /procollab
18-
19-
COPY poetry.lock pyproject.toml /procollab/
20-
21-
22-
RUN poetry config virtualenvs.create false \
23-
&& poetry install --no-root
24-
25-
EXPOSE 8000
26-
27-
RUN mkdir /procollab/staticfiles
28-
RUN mkdir /procollab/static
29-
30-
COPY . /procollab/
31-
32-
CMD ["bash", "./scripts/startup.sh"]
33-

docker-compose.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ services:
1414
- .env
1515
environment:
1616
HOST: 0.0.0.0
17+
expose:
18+
- 8000
1719
grafana:
1820
container_name: grafana
1921
image: grafana/grafana:latest
20-
ports:
21-
- "3000"
22+
expose:
23+
- 3000
2224
volumes:
2325
- grafana-data:/var/lib/grafana
2426
- grafana-configs:/etc/grafana
@@ -28,16 +30,16 @@ services:
2830
prometheus:
2931
container_name: prometheus
3032
image: prom/prometheus:v2.36.0
31-
ports:
32-
- "9090"
33+
expose:
34+
- 9090
3335
volumes:
3436
- prom-data:/prometheus
3537
- ./prometheus:/etc/prometheus
3638
node-exporter:
3739
container_name: node-exporter
3840
image: prom/node-exporter:v1.3.1
39-
ports:
40-
- "9100"
41+
expose:
42+
- 9100
4143
volumes:
4244
- /proc:/host/proc:ro
4345
- /sys:/host/sys:ro

nginx/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
FROM nginx:1.21-alpine
22

33
RUN rm /etc/nginx/conf.d/default.conf
4-
COPY nginx.conf /etc/nginx/conf.d
4+
COPY ./nginx.conf /etc/nginx/conf.d

nginx/nginx.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
server {
22

3-
listen 80;
3+
listen 8000;
44

55
server_name api.procollab.ru;
66
client_max_body_size 100M;
77

88
location / {
9-
proxy_pass http://web:8000;
9+
proxy_pass http://web:8080;
1010
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
1111
proxy_set_header Host $host;
1212
proxy_redirect off;

0 commit comments

Comments
 (0)