Skip to content

Commit

Permalink
Pass docker project_name whenever docker-compose is used
Browse files Browse the repository at this point in the history
 - Also, do no explicitly name containers
  • Loading branch information
rooftopcellist committed Feb 22, 2021
1 parent af6af05 commit b583aeb
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,16 @@
- postgres
state: present
recreate: always
environment:
COMPOSE_PROJECT_NAME: "tools"

- name: Wait for postgres to initialize
wait_for:
timeout: 3

- name: Restore to new postgres container
shell: |
docker-compose -f {{ playbook_dir }}/../_sources/docker-compose.yml exec -T postgres psql -U {{ pg_username }} -d {{ pg_database }} -p {{ pg_port }} < awx_dump.sql
COMPOSE_PROJECT_NAME=tools docker-compose -f {{ playbook_dir }}/../_sources/docker-compose.yml exec -T postgres psql -U {{ pg_username }} -d {{ pg_database }} -p {{ pg_port }} < awx_dump.sql
- name: Clean up temporary awx db dump
file:
Expand Down

0 comments on commit b583aeb

Please sign in to comment.