Skip to content

Commit

Permalink
Fix dev mode with volumes for ARM (#208)
Browse files Browse the repository at this point in the history
Co-authored-by: GitHub Actions <[email protected]>
  • Loading branch information
goshander and web-flow authored Oct 3, 2024
1 parent c0cd4fc commit 050f093
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
7 changes: 5 additions & 2 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ services:
POSTGRES_USER: demo
POSTGRES_PASSWORD: demo
volumes:
- db-demo:/var/lib/postgresql/data
- ./pg-demo-connection/init:/docker-entrypoint-initdb.d
- ./pg-demo-connection/data:/var/lib/postgresql/data

pg-us:
container_name: datalens-pg-us
Expand All @@ -66,7 +66,7 @@ services:
POSTGRES_USER: us
POSTGRES_PASSWORD: us
volumes:
- ./metadata:/var/lib/postgresql/data
- db-us:/var/lib/postgresql/data
ports:
- "8086:5432"

Expand Down Expand Up @@ -114,3 +114,6 @@ services:
HC: ${HC:-0}
YANDEX_MAP_ENABLED: ${YANDEX_MAP_ENABLED:-0}
YANDEX_MAP_TOKEN: ${YANDEX_MAP_TOKEN}
volumes:
db-us:
db-demo:
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ services:
POSTGRES_USER: demo
POSTGRES_PASSWORD: demo
volumes:
- ./pg-demo-connection/init:/docker-entrypoint-initdb.d
- ./pg-demo-connection/data:/var/lib/postgresql/data
- ./pg-demo-connection/init:/docker-entrypoint-initdb.d

pg-us:
container_name: datalens-pg-us
Expand Down
15 changes: 15 additions & 0 deletions templates/docker-compose.j2
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,13 @@ services:
POSTGRES_USER: demo
POSTGRES_PASSWORD: demo
volumes:
{%- if "DEV_MODE"|env(false) %}
- db-demo:/var/lib/postgresql/data
- ./pg-demo-connection/init:/docker-entrypoint-initdb.d
{%- else %}
- ./pg-demo-connection/data:/var/lib/postgresql/data
- ./pg-demo-connection/init:/docker-entrypoint-initdb.d
{%- endif %}

pg-us:
container_name: datalens-pg-us
Expand All @@ -70,7 +75,11 @@ services:
POSTGRES_USER: us
POSTGRES_PASSWORD: us
volumes:
{%- if "DEV_MODE"|env(false) %}
- db-us:/var/lib/postgresql/data
{%- else %}
- ./metadata:/var/lib/postgresql/data
{%- endif %}
{%- if "DEV_MODE"|env(false) %}
ports:
- "8086:5432"
Expand Down Expand Up @@ -122,3 +131,9 @@ services:
HC: ${HC:-0}
YANDEX_MAP_ENABLED: ${YANDEX_MAP_ENABLED:-0}
YANDEX_MAP_TOKEN: ${YANDEX_MAP_TOKEN}

{%- if "DEV_MODE"|env(false) %}
volumes:
db-us:
db-demo:
{%- endif %}

0 comments on commit 050f093

Please sign in to comment.