Skip to content

Latest commit

 

History

History
43 lines (41 loc) · 952 Bytes

README.md

File metadata and controls

43 lines (41 loc) · 952 Bytes

tl;dr

cp .env.example .env
vi .env
docker-compose build
crontab -e
* * * * * cd /opt/etl; docker-compose up

build

docker build . -t mydockertag/etl
docker push mydockertag/etl

docker run

docker pull mydockertag/etl
docker run --rm --name test \
    -e MYSQL_HOST=172.17.0.1 \
    -e MYSQL_USER=<some_data> \
    -e MYSQL_PWD=<some_data> \
    -e MYSQL_DBNAME=test \
    -e MYSQL_QUERY="select * from test.test;" \
    -e S3_FILE_PATH=s3://mys3bucket/mypath/testdump-$(date -u +%Y%m%d-%H%M%S).gz \
    -e S3_ACCESS_KEY=<some_data> \
    -e S3_SECRET_KEY=<some_data> \
    -e S3_HOST=s3.amazonaws.com \
    -e S3_HOST_BUCKET="%(bucket)s.s3.amazonaws.com" \
    -e EMAIL_HOST=172.17.0.1 \
    -e [email protected] \
    -e [email protected],[email protected] \
    -ti mydockertag/etl

docker-compose

cp .env.example .env
vi .env
docker-compose build
docker-compose up