Skip to content

Commit

Permalink
Merge pull request #197 from MattTriano/iss_003_docker_context_refactor
Browse files Browse the repository at this point in the history
Iss 003 docker context refactor
  • Loading branch information
MattTriano authored Aug 18, 2024
2 parents 9008f0c + 8b2cffa commit 19a7868
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 35 deletions.
8 changes: 0 additions & 8 deletions Dockerfiles/python.Dockerfile

This file was deleted.

10 changes: 0 additions & 10 deletions Dockerfiles/superset.Dockerfile

This file was deleted.

32 changes: 16 additions & 16 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ version: "3.9"

x-airflow-common: &airflow-common
build:
context: ./
dockerfile: ./Dockerfiles/airflow.Dockerfile
context: ./docker/airflow
dockerfile: airflow.Dockerfile
env_file:
- .env
environment: &airflow-common-env
Expand Down Expand Up @@ -33,8 +33,8 @@ x-airflow-common: &airflow-common

x-superset-common: &superset-common
build:
context: ./
dockerfile: Dockerfiles/superset.Dockerfile
context: ./docker/superset
dockerfile: superset.Dockerfile
networks:
- re_etl_net
env_file:
Expand Down Expand Up @@ -68,8 +68,8 @@ services:
ss_db:
image: adwh_ss_db:14.5
build:
context: ./
dockerfile: Dockerfiles/airflow_db.Dockerfile
context: ./docker/superset
dockerfile: postgres.Dockerfile
env_file:
- .env.superset
networks:
Expand Down Expand Up @@ -102,8 +102,8 @@ services:
redis:
image: adwh_redis:7.0.8
build:
context: ./
dockerfile: Dockerfiles/redis.Dockerfile
context: ./docker/redis
dockerfile: redis.Dockerfile
ports:
- "6379:6379"
volumes:
Expand All @@ -120,8 +120,8 @@ services:
airflow_db:
image: adwh_airflow_pg_db:14.5
build:
context: ./
dockerfile: Dockerfiles/airflow_db.Dockerfile
context: ./docker/airflow
dockerfile: airflow_db.Dockerfile
shm_size: 4gb
env_file:
- .env
Expand All @@ -148,8 +148,8 @@ services:
dwh_db:
image: adwh_dwh_postgis_db:15.3.3
build:
context: ./
dockerfile: Dockerfiles/postgis.Dockerfile
context: ./docker/postgis
dockerfile: postgis.Dockerfile
shm_size: 4gb
env_file:
- .env.dwh
Expand Down Expand Up @@ -178,8 +178,8 @@ services:
db_admin:
image: adwh_pgadmin:7.7
build:
context: ./
dockerfile: ./Dockerfiles/pgadmin4.Dockerfile
context: ./docker/pgadmin
dockerfile: pgadmin4.Dockerfile
env_file:
- .env
restart: always
Expand All @@ -195,8 +195,8 @@ services:
dbt_proj:
image: adwh_dbt:1.6.3
build:
context: ./
dockerfile: ./Dockerfiles/dbt.Dockerfile
context: ./docker/dbt
dockerfile: dbt.Dockerfile
env_file:
- .env
stdin_open: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ RUN apt-get update \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
USER airflow
COPY requirements/airflow_requirements.txt /requirements.txt
COPY requirements.txt /requirements.txt
RUN pip install --upgrade pip
RUN pip install -v --no-cache-dir -r /requirements.txt
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions docker/superset/postgres.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM postgres:14.5
File renamed without changes.
10 changes: 10 additions & 0 deletions docker/superset/superset.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM apache/superset:2.1.0

COPY docker-init.sh /app/docker/docker-init.sh
COPY pythonpath_dev /app/docker/pythonpath_dev
COPY docker-bootstrap.sh /app/docker/docker-bootstrap.sh
COPY requirements.txt /app/docker/requirements.txt

USER root
RUN pip install -v --no-cache -r /app/docker/requirements.txt
USER superset

0 comments on commit 19a7868

Please sign in to comment.