version: "3.9"
services:
    kuadrado_server:
        build:
            context: .
            dockerfile: ./dev.Dockerfile
        container_name: "kuadrado_server"
        restart: unless-stopped
        ports:
            - 80:${SERVER_PORT}
            - 443:${SERVER_PORT_TLS}
        volumes:
            - ./src:/usr/src/kuadrado_server/src:ro
            - ./Cargo.toml:/usr/src/kuadrado_server/Cargo.toml:ro
            - ./public:${RESOURCES_DIR}/public:ro
            - /etc/letsencrypt/:${RESOURCES_DIR}/certs:ro
        command: cargo run
        env_file:
            - ./.env
