services: bot: # The image is built by `./build.sh image`, which stages the Salam # compiler and its standard library where the Dockerfile can reach them. # `docker compose build` alone cannot: the socket.io client this bot needs # is newer than the last Salam release, so the image cannot fetch a # compiler for itself yet. build: . image: pocket-option-telegram-bot:latest container_name: pocket-option-bot restart: unless-stopped init: true stop_grace_period: 20s env_file: - .env environment: DB_PATH: /app/data/bot.sqlite HEARTBEAT_PATH: /app/data/heartbeat user: "${DOCKER_UID:-1000}:${DOCKER_GID:-1000}" volumes: - type: bind source: ${DATA_DIR:-./data} target: /app/data bind: create_host_path: false read_only: true tmpfs: - /tmp security_opt: - no-new-privileges:true mem_limit: 512m healthcheck: test: ["CMD", "/app/docker/healthcheck.sh"] interval: 60s timeout: 10s retries: 3 start_period: 45s logging: driver: json-file options: max-size: "10m" max-file: "5"