Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '3'
- services:
- db:
- image: postgres
- volumes:
- - ./data/db:/var/lib/postgresql/data
- environment:
- #- POSTGRES_NAME=postgres
- #- POSTGRES_USER=postgres
- #- POSTGRES_PASSWORD=postgres
- ports:
- - "5432:5432"
- redis:
- image: redis
- ports:
- - "6379:6379"
- celery:
- command: celery -A core worker -l info
- volumes:
- - ./app:/app
- environment:
- #DEBUG
- #SECRET_KEY
- #DJANGO_ALLOWED_HOSTS
- depends_on:
- redis
- celery-beat:
- command: celery -A core beat -l info
- volumes:
- - ./app:/app
- environment:
- #DEBUG
- #SECRET_KEY
- #DJANGO_ALLOWED_HOSTS
- depends_on:
- redis
- centrifugal:
- image: centrifugo/centrifugo
- command: centrifugo -c config.json --engine=redis --redis_host=redis --redis_port=6379
- ports:
- - "8000:8000"
- volumes:
- - "./config:/centrifugo"
- ulimits:
- nproc: 65536
- nofile:
- soft: 65536
- hard: 65536
- app:
- build: .
- command: python manage.py runserver 0.0.0.0:8000
- volumes:
- - ./app:/app
- ports:
- - "8000:8000"
- environment:
- # - POSTGRES_NAME=postgres
- # - POSTGRES_USER=postgres
- # - POSTGRES_PASSWORD=postgres
- depends_on:
- - db
- FROM scratch
- WORKDIR /
- RUN \
- sudo apt update -y && \
- sudo apt upgrade -y && \
- sudo apt install \
- python3-pip \
- chromium-browser \
- supervisor \
- postgresql postgresql-contrib \
- python3-dev \
- python3-venv \
- nginx \
- net-tools \
- openssh-server \
- git -y \
- RUN \
- sudo systemctl enable ssh \
- sudo systemctl start ssh \
- RUN \
- cd /home/guard/venv_keyguard/ \
- git clone https://github.com/DaniilNikolaevich/keyguard.git \
- RUN \
- cd /home/guard/ \
- sudo mkdir centrifugo \
- cd centrifugo \
- sudo wget https://github.com/centrifugal/centrifugo/releases/download/v2.7.2/centrifugo_2.7.2_linux_amd64.tar.gz \
- RUN \
- sudo tar -xzvf centrifugo_2.7.2_linux_amd64.tar.gz \
- sudo chmod +x centrifugo \
- sudo /home/guard/centrifugo/centrifugo genconfig \
- COPY requirements.txt .
- RUN pip install -r requirements.txt
- RUN mkdir /app
- COPY ./app /app
- WORKDIR /app
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement