Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move dockerfiles to a docker/ directory #243

Merged
merged 3 commits into from
Oct 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,12 @@ ci:
# lint runs the linter.
.PHONY: lint
lint:
chmod +rwx scripts/*.sh
scripts/lint.sh

# fmt runs the formatter.
.PHONY: fmt
fmt:
docker build -t gofumpt -f scripts/fmt.Dockerfile .
docker run -t -v $(PWD):/app gofumpt
./scripts/fmt.sh

# add-license adds the license to all the top of all the .go files.
.PHONY: add-license
Expand Down
8 changes: 3 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,20 @@ services:
ci:
build:
context: .
dockerfile: scripts/ci.Dockerfile
dockerfile: docker/ci.Dockerfile
networks:
- mongo_network
- postgres_network


lint:
build:
context: .
dockerfile: scripts/lint.Dockerfile
dockerfile: docker/lint.Dockerfile

# This is not currently being used in the Makefile.
fmt:
build:
context: .
dockerfile: scripts/fmt.Dockerfile
dockerfile: docker/fmt.Dockerfile
volumes:
- .:/app

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions scripts/fmt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

docker-compose -f "docker-compose.yml" up -d \
--remove-orphans \
--force-recreate \
--build fmt

docker-compose -f docker-compose.yml run --rm fmt