diff --git a/ansible/roles/our/tasks/deploy.yml b/ansible/roles/our/tasks/deploy.yml index fc1af97..738d92a 100644 --- a/ansible/roles/our/tasks/deploy.yml +++ b/ansible/roles/our/tasks/deploy.yml @@ -20,6 +20,13 @@ clone: true force: true +- name: Copy the db compose file + ansible.builtin.copy: + remote_src: true + src: /tmp/checkout/services/our/compose.db.yaml + dest: /etc/futureporn/our/compose.db.yaml + mode: "0744" + - name: Copy the compose file ansible.builtin.copy: remote_src: true @@ -27,6 +34,13 @@ dest: /etc/futureporn/our/compose.production.yaml mode: "0744" +- name: Deploy db stack + community.docker.docker_stack: + state: present + name: our-postgres + compose: + - /etc/futureporn/our/compose.db.yaml + - name: Deploy stack to green community.docker.docker_stack: state: present diff --git a/services/our/compose.db.yaml b/services/our/compose.db.yaml new file mode 100644 index 0000000..425c5dc --- /dev/null +++ b/services/our/compose.db.yaml @@ -0,0 +1,12 @@ +services: + pgadmin: + image: dpage/pgadmin4:latest + env_file: ./.env + ports: + - target: 5050 + published: 8095 + protocol: tcp + mode: ingress + +volumes: + pgdata: diff --git a/services/our/compose.production.yaml b/services/our/compose.production.yaml index ca8cec3..633da82 100644 --- a/services/our/compose.production.yaml +++ b/services/our/compose.production.yaml @@ -66,15 +66,3 @@ services: init: false volumes: - /mnt/vfs/futureporn:/mnt/vfs/futureporn - - pgadmin: - image: dpage/pgadmin4:latest - env_file: ./.env - ports: - - target: 5050 - published: 8095 - protocol: tcp - mode: ingress - -volumes: - pgdata: