Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

Commit

Permalink
Move dev-specific services into compose overrides file
Browse files Browse the repository at this point in the history
  • Loading branch information
AetherUnbound committed Oct 4, 2021
1 parent 3c99a17 commit 1ef64cc
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/push_pull_request_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
run: |
cd ./openverse_catalog
cp env.template .env
docker-compose up -d
docker-compose --file=docker-compose.yml --file=openverse_catalog/docker-compose.override.yml up -d
- name: Test
run: |
sleep 10
Expand Down
26 changes: 26 additions & 0 deletions openverse_catalog/docker-compose.override.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,35 @@
version: '3'

services:
# Services only needed for local development
postgres:
build: ./local_postgres
environment:
- POSTGRES_USER=deploy
- POSTGRES_PASSWORD=deploy
- POSTGRES_DB=openledger
env_file: .env
ports:
- "5434:5432"
volumes:
- postgres-volume:/var/lib/postgresql/data

s3:
build:
context: ./local_s3
ports:
- "5000:5000"

# Dev changes for the webserver container
webserver:
depends_on:
- postgres
- s3
volumes:
- ./dags:/usr/local/airflow/dags
build:
args:
- REQUIREMENTS_FILE=requirements_dev.txt

volumes:
postgres-volume:
21 changes: 0 additions & 21 deletions openverse_catalog/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
version: '3'

services:
postgres:
build: ./local_postgres
environment:
- POSTGRES_USER=deploy
- POSTGRES_PASSWORD=deploy
- POSTGRES_DB=openledger
env_file: .env
ports:
- "5434:5432"
volumes:
- postgres-volume:/var/lib/postgresql/data

s3:
build:
context: ./local_s3
ports:
- "5000:5000"

webserver:
build:
Expand All @@ -27,14 +10,10 @@ services:
- REQUIREMENTS_FILE=requirements_prod.txt
env_file: .env
restart: always
depends_on:
- postgres
- s3
ports:
- "${AIRFLOW_PORT}:8080"
volumes:
- airflow-volume:/tmp/workflow_output

volumes:
airflow-volume:
postgres-volume:

0 comments on commit 1ef64cc

Please sign in to comment.