Spaces:
Paused

File size: 1,223 Bytes
1bd81a0
 
 
 
9d1de90
 
 
1bd81a0
 
 
9d1de90
 
 
1bd81a0
4704840
9d1de90
 
 
a734604
f290191
9d1de90
4704840
 
1bd81a0
9d1de90
4704840
 
1bd81a0
4704840
1bd81a0
4704840
 
1bd81a0
9d1de90
1bd81a0
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y \
    locales ttyd postgresql-14 mosquitto nginx supervisor \
    sudo curl btop openssh-server ca-certificates iproute2 \
    && locale-gen en_US.UTF-8 \
    && rm -rf /var/lib/apt/lists/*

# Исправленная установка Chisel
RUN curl https://i.jpillora.com/chisel! | bash && \
    chmod +x /usr/local/bin/chisel

# Настройки SSH
RUN mkdir -p /var/run/sshd && \
    ssh-keygen -A && \
    echo "PermitRootLogin yes" >> /etc/ssh/sshd_config && \
    echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config

# Создание необходимых папок
RUN mkdir -p /var/run/postgresql /var/log/supervisor /var/log/nginx /var/www/html && \
    chown -R postgres:postgres /var/run/postgresql

# Копируем конфиги
COPY nginx.conf /etc/nginx/sites-available/default
COPY supervisord.conf /etc/supervisor/supervisord.conf
COPY mosquitto.conf /etc/mosquitto/mosquitto.conf
COPY entrypoint.sh /entrypoint.sh

RUN chmod +x /entrypoint.sh && \
    echo "<h1>Server is running!</h1>" > /var/www/html/index.html

# HF требует порт 7860
EXPOSE 7860
ENTRYPOINT ["/entrypoint.sh"]