Skip to content

Commit

Permalink
refactor: Reorganize release/build structure
Browse files Browse the repository at this point in the history
  • Loading branch information
kaynetik committed Oct 7, 2024
1 parent 8e54e34 commit cebda43
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile → .build/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN bun install
EXPOSE 5384

# Entry script to handle conditional startup
COPY ./docker-entrypoint.sh ./docker-entrypoint.sh
COPY .build/docker/docker-entrypoint.sh ./docker-entrypoint.sh
RUN chmod +x ./docker-entrypoint.sh

ENTRYPOINT ["sh", "./docker-entrypoint.sh"]
4 changes: 3 additions & 1 deletion docker-compose.yml → .build/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
services:
seda-data-proxy:
build: .
build:
context: ../..
dockerfile: .build/docker/Dockerfile
ports:
- "5384:5384"
# environment:
Expand Down
File renamed without changes.
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ permissions:
contents: write
packages: write

# env:
# REGISTRY_IMAGE: ghcr.io/${{ github.repository }}/seda-data-proxy

env:
REGISTRY: ghcr.io
IMAGE_NAME: sedaprotocol/seda-data-proxy
Expand Down Expand Up @@ -48,6 +45,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
file: .build/docker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
31 changes: 31 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.PHONY: build run stop up clean logs ssh

# Define the docker-compose file location
DOCKER_COMPOSE_FILE := .build/docker/docker-compose.yml

# Build the Docker image
build:
docker compose -f $(DOCKER_COMPOSE_FILE) build

# Run the Docker container
run:
docker compose -f $(DOCKER_COMPOSE_FILE) up

# Stop the Docker container
stop:
docker compose -f $(DOCKER_COMPOSE_FILE) down

# Build and run the Docker container
up: build run

# Clean up Docker resources
clean:
docker compose -f $(DOCKER_COMPOSE_FILE) down --rmi all --volumes --remove-orphans

# Show logs
logs:
docker compose -f $(DOCKER_COMPOSE_FILE) logs -f

# SSH into the running container
ssh:
docker compose -f $(DOCKER_COMPOSE_FILE) exec seda-data-proxy sh

0 comments on commit cebda43

Please sign in to comment.