tech-test-infra/ansible/backend/tasks/main.yml

25 lines
482 B
YAML

---
- name: Copy backend files
ansible.builtin.copy:
src: go-backend
dest: /home/nonroot/
owner: nonroot
group: nonroot
- name: Build image with go-backend
community.docker.docker_image:
build:
path: /home/nonroot/go-backend
name: go-backend
source: build
- name: Start the docker image to serve the backend
community.docker.docker_container:
name: backend
image: go-backend
exposed_ports:
- 5050
become_user: nonroot