Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

working docker-compose: solved .mage_data persistance issue #30

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# ignore src/
src/
# ignore venv/
venv/
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ MYSQL_HOST='mysql_host'
MYSQL_DB='mysql_db'
MYSQL_PORT='3306'

MAGE_DATA_DIR= 'path/to/mage/data'
PIPELINE_HOST='localhost'
PIPELINE_PORT='6789'
8 changes: 5 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ services:
dockerfile: Dockerfile
restart: always
environment:
MAGE_DATA_DIR: ../.mage_data
MAGE_DATA_DIR: ${MAGE_DATA_DIR}
PIPELINE_POSTGRES_USER: ${POSTGRES_USER}
PIPELINE_POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
PIPELINE_POSTGRES_DB: ${POSTGRES_DB}
Expand All @@ -48,7 +48,9 @@ services:
retries: 5
start_period: 10s
volumes:
- /home/vnbl/data_retriever:/app

- ./:/app
# manually transfer .mage_data with already created secrets to server or store secrets in server's mage UI during deployment
- ../.mage_data:/root/.mage_data

volumes:
postgres_data:
2 changes: 1 addition & 1 deletion etl-pipeline/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
project_type: standalone

variables_dir: /app/.mage_data/
variables_dir: "{{ env_var('MAGE_DATA_DIR') }}"
# remote_variables_dir: s3://bucket/path_prefix

variables_retention_period: '90d'
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ typer==0.9.0
typing_extensions==4.10.0
tzdata==2024.2
tzlocal==5.2
urllib3==2.2.3
urllib3==1.26.20
utilsforecast==0.2.5
watchdog==4.0.0
wcwidth==0.2.13
Expand All @@ -298,4 +298,4 @@ xarray==2024.9.0
xgboost==2.1.1
yarl==1.13.1
zipp==3.20.2
zstandard==0.23.0
zstandard==0.23.0