This DevContainer setup provides a development environment with Docker Compose, Python 3.12, PostgreSQL, Rust, and zsh.
- Python 3.12 with dependencies from
requirements.txt
- PostgreSQL service with configurable environment variables
- Rust/Cargo integrated for additional development
- VS Code Customizations for Python linting, formatting, and Docker integration
- Docker
- Visual Studio Code
-
Clone the Repository:
git clone https://github.com/skyl/corpora.git cd corpora
-
Create
.env
from Example:-
Copy
.env.example
to.env
:cp .env.example .env
-
-
Open in VS Code:
- Open the
corpora
folder in VS Code. - Ensure Docker is running.
- Open the
-
Build & Connect in DevContainer:
- Reopen the folder in a container:
- Open Command Palette (Cmd+Shift+P or Ctrl+Shift+P).
- Run
Remote-Containers: Reopen in Container
.
- Reopen the folder in a container:
-
Environment Configuration:
-
Set API keys and credentials in
.env
:OPENAI_API_KEY="" CORPORA_CLIENT_ID="" CORPORA_CLIENT_SECRET="" GITHUB_TOKEN=""
-
-
Post-Setup Commands:
-
Run server initialization:
cd py/packages/corpora_proj ./manage.py migrate ./manage.py createsuperuser
-
Open your host browser and go to
localhost:8877/admin/
.- Log in with your superuser account.
- Create an OAuth application:
- URL:
http://localhost:8877/admin/oauth2_provider/application/add/
- Choose
Confidential
andClient credentials
- Add your superuser as the owner of the application
- Update
.env
file withCORPORA_CLIENT_ID
andCORPORA_CLIENT_SECRET
.
- URL:
-
-
Rebuild DevContainer:
- Reload to apply
.env
changes.
- Reload to apply
With .env
configured and the devcontainer running, use CLI commands:
corpora corpus init
corpora corpus sync
corpora workon file README.md
corpora plan issue
- App: 8877
- Variations in Docker setup can be found in
../docker-compose.yaml
and../docker/README.md
. - To run without VS Code, use Docker Compose directly.
- The directory sets up Docker and Compose for VS Code integration.
- Contains
README.md
,devcontainer.json
,setup.sh
. - Interactive container includes Rust/Cargo, full Python/Django/Postgres setup, with zsh.