Go to file
Francisco Sandoval b8873ad140 fix trayectos por paradero 2024-03-20 10:57:53 -03:00
utils se ignoran archivos 2023-12-10 19:18:40 -03:00
.gitignore fix requirements 2023-12-10 19:42:13 -03:00
main.py fix trayectos por paradero 2024-03-20 10:57:53 -03:00
readme.md fix requirements 2023-12-10 19:42:13 -03:00
requirements.txt fix requirements 2023-12-10 19:42:13 -03:00

readme.md

file: docker-compose.yml

version: '3'
name: proto

services:

  app:
    image: python:3.11-alpine
    environment:
      - DB_REDIS_HOST=dbproto
      - DB_REDIS_PORT=6379
      - TZ=America/Santiago
    volumes:
      - ./proto:/app
      - venv:/root/venv
    working_dir: /app
    command: sh -c "
      [ -d /root/venv/bin ] || ( \
          python -m venv /root/venv/ \
          && . /root/venv/bin/activate \
          && pip install -r requirements.txt \
      ) ;

      . /root/venv/bin/activate ;

      cd /app ;
      [ -f .env ] || ( [ -f .env.develop ] && cp .env.develop .env ) ;
      watch -n 30 -t python main.py
      "

  dbproto:
    image: redis:7.2-alpine
    ports:
      - 6379:6379

volumes:
  venv: