hello everyone, I am new to dagster. I am trying t...
# ask-community
n
hello everyone, I am new to dagster. I am trying to create dasgter in local docker. I followed the example here. however in the example dagster picks up all the assets and code from the repo.py file which is a single file. in my usecase, I am creating a folder called “etl” which will have the assets, schedules and other job files. is there a way to pick up all files under a folder when using the gRPC command? currently it is like this CMD [“dagster”, “api”, “grpc”, “-h”, “0.0.0.0", “-p”, “4000", “-f”, “./repo.py”] how would I change this to pick up all files from under a folder?
🤖 1
a
You should be able to use the
-m
command instead of
-f
assuming your
etl
folder is a python module with an
__init__.py
in it
n
it does not seem to work. this is how my repo is structured: and also my docker file is
Copy code
FROM python:3.7-slim

# Checkout and install dagster libraries needed to run the gRPC server
# exposing your repository to dagit and dagster-daemon, and to load the DagsterInstance

RUN pip install \
    dagster \
    dagster-postgres \
    dagster-docker

# Add repository code

WORKDIR /opt/dagster/app

COPY etl /opt/dagster/app

# Run dagster gRPC server on port 4000

EXPOSE 4000

# CMD allows this to be overridden from run launchers or executors that want
# to run other commands against your repository
CMD ["dagster", "api", "grpc", "-h", "0.0.0.0", "-p", "4000", "-m", "/opt/dagster/app"]
a
I think you would also need a pyproject.toml and setup.py - pyproject.toml
Copy code
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "etl project name"
version = "0.0.1"
authors = [
    { name="your name", email="your email" }
]

[tool.dagster]
module_name = "etl"
n
I think it works nw. thanks for the help
👍 1