├── requirements.txt ├── dev.env ├── Dockerfile ├── README.md ├── docker-compose.yml └── .gitignore /requirements.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev.env: -------------------------------------------------------------------------------- 1 | PROJECT_NAME=your_first_project 2 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mageai/mageai:latest 2 | 3 | ARG USER_CODE_PATH=/home/src/${PROJECT_NAME} 4 | 5 | # Note: this overwrites the requirements.txt file in your new project on first run. 6 | # You can delete this line for the second run :) 7 | COPY requirements.txt ${USER_CODE_PATH}/requirements.txt 8 | 9 | RUN pip3 install -r ${USER_CODE_PATH}/requirements.txt 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 🤔 What is it? 2 | 3 | This is a Docker Compose template for getting started with a new Mage project. 4 | 5 | ## 🙋‍♂️ Why did you create it? 6 | 7 | We created this template for users to have an easy way to deploy a project using Docker. 8 | 9 | Using Docker Compose allows editors to easily add their own images or modify the Mage image to their liking. 10 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | magic: 4 | image: mageai/mageai:latest 5 | command: mage start ${PROJECT_NAME} 6 | env_file: 7 | - .env 8 | build: 9 | context: . 10 | dockerfile: Dockerfile 11 | environment: 12 | USER_CODE_PATH: /home/src/${PROJECT_NAME} 13 | ENV: ${ENV} 14 | ports: 15 | - 6789:6789 16 | volumes: 17 | - .:/home/src/ 18 | restart: on-failure:5 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | .idea 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | target/ 76 | 77 | # Jupyter Notebook 78 | .ipynb_checkpoints 79 | 80 | # IPython 81 | profile_default/ 82 | ipython_config.py 83 | 84 | # pyenv 85 | .python-version 86 | 87 | # pipenv 88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 91 | # install all needed dependencies. 92 | #Pipfile.lock 93 | 94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 95 | __pypackages__/ 96 | 97 | # Celery stuff 98 | celerybeat-schedule 99 | celerybeat.pid 100 | 101 | # SageMath parsed files 102 | *.sage.py 103 | 104 | # Environments 105 | .env 106 | .venv 107 | .DS_Store 108 | env/ 109 | venv/ 110 | ENV/ 111 | env.bak/ 112 | venv.bak/ 113 | 114 | # Spyder project settings 115 | .spyderproject 116 | .spyproject 117 | 118 | # Rope project settings 119 | .ropeproject 120 | 121 | # mkdocs documentation 122 | /site 123 | 124 | # mypy 125 | .mypy_cache/ 126 | .dmypy.json 127 | dmypy.json 128 | 129 | # Pyre type checker 130 | .pyre/ 131 | 132 | # data files 133 | mage_ai/server/data/files/** 134 | default_repo 135 | instance_metadata.json 136 | ~/.mage_data 137 | 138 | # test notebook 139 | test.ipynb 140 | 141 | # test files 142 | testfiles/ 143 | 144 | # Docker specific files 145 | .bash_history 146 | .jupyter/ 147 | .local/ 148 | .npm/ 149 | .python_history 150 | mage_ai/frontend/package-lock.json 151 | docker-compose.override.yml 152 | 153 | # DB files 154 | *.db 155 | 156 | # Terraform files 157 | **/.terraform* 158 | *.tfstate* 159 | *.zip 160 | 161 | # vscode 162 | .vscode/ 163 | 164 | # front-end 165 | node_modules 166 | .npmrc 167 | 168 | # Scratch files 169 | scratch* 170 | /mage_data* 171 | *secrets*.json 172 | your-first-project 173 | --------------------------------------------------------------------------------