larra/.devcontainer/docker-compose.yml

39 lines
1.1 KiB
YAML

services:
devcontainer:
build:
context: .
dockerfile: Dockerfile
# Required for ptrace-based debuggers like C++, Go, and Rust
cap_add:
- SYS_PTRACE
security_opt:
- seccomp:unconfined
volumes:
- ../..:/workspaces/:cached
- /var/run/docker.sock:/var/run/docker.sock:ro
network_mode: service:ejabberd_server # To access ejabberd inside a devcontainer
command: sleep infinity # To keep container alive
depends_on:
- ejabberd_server
ejabberd_server:
image: ghcr.io/processone/ejabberd
container_name: ejabberd
#
# For some reasons below environment variables doesn't work inside vs code dev container
# Please, use devcontainer.json 'postStartCommand' for configuring ejabberd_server
#
environment:
- CTL_ON_CREATE=register admin localhost "admin" ;
register test1 localhost "test1"
- CTL_ON_START=registered_users localhost ;
status
ports:
- "5222:5222"
- "5269:5269"
- "5280:5280"
- "5443:5443"
volumes:
- ./ejabberd.yml:/opt/ejabberd/conf/ejabberd.yml:ro