Skip to content

Commit

Permalink
fix: ansible app expose ports
Browse files Browse the repository at this point in the history
  • Loading branch information
temarusanov committed Apr 18, 2023
1 parent 9614bec commit 2a55aec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion devops/ansible/roles/start_app_api/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ docker_app__env:
DATABASE_URL: "postgres://postgres:postgres@postgres:5432/postgres?schema=public"

# Do not change
docker_postgres__ports:
docker_app__ports:
- "{{ docker_app__port }}:3000"
6 changes: 3 additions & 3 deletions devops/ansible/roles/start_app_api/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
state: absent
when: docker_postgres__remove_existing_container

- name: Run postgres container
- name: Run {{ docker_app__name }} container
docker_container:
name: "{{ docker_app__name }}"
image: "{{ docker_app__image }}"
restart_policy: always
network_mode: "{{ docker_app__network_mode }}"
networks: "{{ docker_app__networks }}"
expose:
- "{{ docker_app__port }}"
ports: "{{ docker_app__port }}"
- "{{ docker_app__ports }}"
ports: "{{ docker_app__ports }}"
env: "{{ docker_app__env }}"
# - name: Wait for app to be started
# wait_for:
Expand Down

0 comments on commit 2a55aec

Please sign in to comment.