Skip to content

Commit

Permalink
[IMP] Expose ports for traefik < 3
Browse files Browse the repository at this point in the history
  • Loading branch information
josep-tecnativa committed Oct 17, 2024
1 parent 2cf353c commit b0e3c7a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion copier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ postgres_exposed:
postgres_exposed_port:
default: 5432
type: int
when: &db_exposed "{{ postgres_exposed and true }}"
when: &db_exposed "{{ postgres_exposed and traefik_version != 3 }}"
help: >-
Indicate the port to connect to the database.
Expand Down
5 changes: 5 additions & 0 deletions prod.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ services:
- .docker/db-creation.env
restart: unless-stopped
{%- if postgres_exposed %}
{%- if traefik_version == 3 %}
networks:
default:
inverseproxy_shared:
Expand All @@ -101,6 +102,10 @@ services:
postgres_exposed_port,
project_name,
) }}
{%- else %}
ports:
- "{{ postgres_exposed_port }}:5432"
{%- endif %}
{%- endif %}
{%- endif %}

Expand Down

0 comments on commit b0e3c7a

Please sign in to comment.