Skip to content

Instantly share code, notes, and snippets.

@gnosek
Created February 16, 2018 16:27
Show Gist options
  • Save gnosek/2cd9abb8308a4d90688f82e14a04639e to your computer and use it in GitHub Desktop.
Save gnosek/2cd9abb8308a4d90688f82e14a04639e to your computer and use it in GitHub Desktop.
AWX via docker-compose
postgres:
image: "postgres:9.6"
restart: unless-stopped
environment:
POSTGRES_USER: awx
POSTGRES_PASSWORD: ___postgres_passwd
POSTGRES_DB: awx
PGDATA: /var/lib/postgresql/data/pgdata
command: postgres -c wal_level=replica
volumes:
- ./postgres:/var/lib/postgresql/data
rabbitmq:
image: "rabbitmq:3"
restart: unless-stopped
environment:
RABBITMQ_DEFAULT_VHOST: awx
memcached:
image: "memcached:alpine"
restart: unless-stopped
awx_web:
image: "ansible/awx_web:latest"
restart: unless-stopped
links:
- rabbitmq
- memcached
- postgres
hostname: awxweb
user: root
environment:
SECRET_KEY: ___secret_key
DATABASE_USER: awx
DATABASE_PASSWORD: __postgres_passwd
DATABASE_NAME: awx
DATABASE_PORT: 5432
DATABASE_HOST: postgres
RABBITMQ_USER: guest
RABBITMQ_PASSWORD: guest
RABBITMQ_HOST: rabbitmq
RABBITMQ_PORT: 5672
RABBITMQ_VHOST: awx
MEMCACHED_HOST: memcached
MEMCACHED_PORT: 11211
VIRTUAL_HOST: ___example.com
LETSENCRYPT_HOST: ___example.com
LETSENCRYPT_EMAIL: [email protected]
awx_task:
image: "ansible/awx_task:latest"
restart: unless-stopped
links:
- rabbitmq
- memcached
- awx_web:awxweb
- postgres
hostname: awx
user: root
environment:
SECRET_KEY: ___secret_key
DATABASE_USER: awx
DATABASE_PASSWORD: ___postgres_passwd
DATABASE_NAME: awx
DATABASE_PORT: 5432
DATABASE_HOST: postgres
RABBITMQ_USER: guest
RABBITMQ_PASSWORD: guest
RABBITMQ_HOST: rabbitmq
RABBITMQ_PORT: 5672
RABBITMQ_VHOST: awx
MEMCACHED_HOST: memcached
MEMCACHED_PORT: 11211
nginx:
image: jwilder/nginx-proxy
restart: unless-stopped
hostname: nginx-proxy
restart: always
ports:
- 80:80
- 443:443
volumes:
- ./nginx/certs:/etc/nginx/certs:ro
- ./nginx/htpasswd:/etc/nginx/htpasswd:ro
- ./nginx/vhost.d:/etc/nginx/vhost.d
- ./nginx/html:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
restart: unless-stopped
hostname: letsencrypt-nginx
restart: always
volumes_from:
- nginx
volumes:
- ./nginx/certs:/etc/nginx/certs:rw
- /var/run/docker.sock:/var/run/docker.sock:ro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment