Docker compose cleanup

- preferred naming convenion is compose.yaml
- test compose was redundant
- uncomment build section for convenience, since it's only used as a fallback
This commit is contained in:
Roy Crihfield 2023-06-01 20:07:37 +08:00
parent dcd911a8ff
commit 5b92e02ebd
4 changed files with 5 additions and 45 deletions

View File

@ -9,7 +9,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Run docker build
run: make docker-build
run: docker compose build
test:
# Add a dummy job to avoid failing GitHub CI checks.
# Other checks to be added later.

View File

@ -111,17 +111,6 @@ import:
test -n "$(NAME)" # $$NAME
psql $(NAME) < schema.sql
## Build docker image with schema
.PHONY: docker-build
docker-build:
docker-compose -f docker-compose.test.yml build
# ## Build docker image for migration
# .PHONY: docker-concise-migration-build
# docker-concise-migration-build:
# docker build -t cerc/concise-migration-build -f ./db/Dockerfile .
.PHONY: test-migrations
test-migrations: $(GOOSE)
./scripts/test_migration.sh

View File

@ -1,14 +1,12 @@
version: '3.2'
services:
migrations:
restart: on-failure
depends_on:
- ipld-eth-db
# Use local build
#build:
#context: .
#dockerfile: Dockerfile
build:
context: .
dockerfile: Dockerfile
# Use an existing image
image: cerc/ipld-eth-db
environment:

View File

@ -1,27 +0,0 @@
version: '3.2'
services:
migrations:
restart: on-failure
depends_on:
- ipld-eth-db
image: cerc/ipld-eth-db
# Build image using local context
build: .
environment:
DATABASE_USER: "vdbm"
DATABASE_NAME: "cerc_testing"
DATABASE_PASSWORD: "password"
DATABASE_HOSTNAME: "ipld-eth-db"
DATABASE_PORT: 5432
ipld-eth-db:
image: timescale/timescaledb:latest-pg14
restart: always
command: ["postgres", "-c", "log_statement=all"]
environment:
POSTGRES_USER: "vdbm"
POSTGRES_DB: "cerc_testing"
POSTGRES_PASSWORD: "password"
ports:
- "127.0.0.1:8077:5432"