Files
sure/.devcontainer/docker-compose.yml
Himank Dave 1ae9e3e8fb feat(devcontainer): upgrade dev environment with better prompts, extensions, and configs (#95)
* chore(devcontainer): optimize Dockerfile for Ruby dev environment

* chore(devcontainer): update container name and improve VSCode settings

- Rename devcontainer from 'Maybe' to 'Sure'
- Add GIT_EDITOR env var for VSCode integration
- Add Shopify Ruby extensions pack

* feat(devcontainer): add custom Bash prompt with Git info

- Implement Git branch, status markers in prompt
- Show username, current dir, and Git info with colors
- Mount custom .bashrc into container for prompt enhancements

* fix(devcontainer): improve branch detection & status markers in prompt

- Support detached HEAD by showing short SHA
- Show detailed git states: rebase, merge, bisect, am
- Fix prompt formatting and trailing colors

* Better solution to GitHub Codespaces CSRF issue

* feat(devcontainer): add Git autocompletion support in bashrc

* refactor(devcontainer): reorder volumes and service settings

- Added volume mounts for workspace & bundle cache to worker service.

---------

Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2025-08-10 07:53:46 +02:00

68 lines
1.2 KiB
YAML

x-db-env: &db_env
POSTGRES_USER: postgres
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
x-rails-env: &rails_env
DB_HOST: db
HOST: "0.0.0.0"
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
BUNDLE_PATH: /bundle
REDIS_URL: redis://redis:6379/1
services:
app:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
volumes:
- ./.bashrc:/root/.bashrc:ro,cached
- ..:/workspace:cached
- bundle_cache:/bundle
ports:
- "3000:3000"
command: sleep infinity
environment:
<<: *rails_env
depends_on:
- db
- redis
worker:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
volumes:
- ..:/workspace:cached
- bundle_cache:/bundle
command: bundle exec sidekiq
restart: unless-stopped
environment:
<<: *rails_env
depends_on:
- redis
redis:
image: redis:latest
volumes:
- redis-data:/data
ports:
- "6379:6379"
restart: unless-stopped
db:
image: postgres:latest
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- "5432:5432"
restart: unless-stopped
environment:
<<: *db_env
volumes:
postgres-data:
redis-data:
bundle_cache: