Juergen Edelbluth
b7179f1271
Source Code zum Blogbeitrag https://j4n.e7h.eu/article/2024-10-26_18-00-00_django_devcontainer_postgresql_db_redis
32 lines
722 B
YAML
32 lines
722 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
devcontainer:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
command: sleep infinity
|
|
volumes:
|
|
- ../..:/workspaces:cached
|
|
db:
|
|
image: postgres:alpine
|
|
environment:
|
|
POSTGRES_PASSWORD: developer
|
|
POSTGRES_USER: developer
|
|
cache:
|
|
image: redis:alpine
|
|
restart: always
|
|
pgweb:
|
|
image: ghcr.io/sosedoff/pgweb:latest
|
|
restart: always
|
|
environment:
|
|
- DATABASE_URL=postgres://developer:developer@db:5432/developer?sslmode=disable
|
|
depends_on:
|
|
- db
|
|
commander:
|
|
image: ghcr.io/joeferner/redis-commander:latest
|
|
restart: always
|
|
environment:
|
|
REDIS_HOSTS: Django-Cache:cache:6379:10
|
|
PORT: 8080
|
|
user: redis |