awx/tools/docker-compose.yml
Shane McDonald a361b5da6e
Fix permissions when running dev container as non-root user
I wanted to pass `—user` to `docker-compose` up, but that option doesnt exist. To get around this, I had to record the uid on the host (CURRENT_UID), interpolate the variable in tools/docker-compose.yml, and detect that inside the container. I then piggy-backed on the /etc/passwd hack we use for scenarios with unpredictable uids.
2018-10-24 10:30:04 -04:00

50 lines
1.1 KiB
YAML

version: '2'
services:
# Primary AWX Development Container
awx:
user: ${CURRENT_UID}
image: ${DEV_DOCKER_TAG_BASE}/awx_devel:${TAG}
hostname: awx
environment:
RABBITMQ_HOST: rabbitmq
RABBITMQ_USER: guest
RABBITMQ_PASS: guest
RABBITMQ_VHOST: /
SDB_HOST: 0.0.0.0
AWX_GROUP_QUEUES: tower
ports:
- "8888:8888"
- "8080:8080"
- "8013:8013"
- "8043:8043"
- "6899-6999:6899-6999" # default port range for sdb-listen
links:
- postgres
- memcached
- rabbitmq
# - sync
# volumes_from:
# - sync
volumes:
- "../:/awx_devel"
privileged: true
# A useful container that simply passes through log messages to the console
# helpful for testing awx/tower logging
# logstash:
# build:
# context: ./docker-compose
# dockerfile: Dockerfile-logstash
# Postgres Database Container
postgres:
image: postgres:9.6
ports:
- "5432:5432"
memcached:
image: memcached:alpine
ports:
- "11211:11211"
rabbitmq:
image: rabbitmq:3-management
ports:
- "15672:15672"