-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from NikhilSharma03/update_dockerfile
feat: update `docker compose` file
- Loading branch information
Showing
8 changed files
with
156 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
root = "." | ||
testdata_dir = "testdata" | ||
tmp_dir = "tmp" | ||
|
||
[build] | ||
args_bin = [] | ||
bin = "./tmp/main" | ||
cmd = "go build -buildvcs=false -o ./tmp/main ./cmd" | ||
delay = 0 | ||
exclude_dir = ["assets", "tmp", "vendor", "testdata"] | ||
exclude_file = [] | ||
exclude_regex = ["_test.go"] | ||
exclude_unchanged = false | ||
follow_symlink = false | ||
full_bin = "" | ||
include_dir = ["cmd"] | ||
include_ext = ["go", "tpl", "tmpl", "html"] | ||
include_file = [] | ||
kill_delay = "0s" | ||
log = "build-errors.log" | ||
rerun = false | ||
rerun_delay = 500 | ||
send_interrupt = false | ||
stop_on_error = false | ||
|
||
[color] | ||
app = "" | ||
build = "yellow" | ||
main = "magenta" | ||
runner = "green" | ||
watcher = "cyan" | ||
|
||
[log] | ||
main_only = false | ||
time = false | ||
|
||
[misc] | ||
clean_on_exit = true | ||
|
||
[screen] | ||
clear_on_rebuild = true | ||
keep_scroll = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
cli | ||
# git dir | ||
.git | ||
.github | ||
assets | ||
|
||
# environment vars | ||
.env | ||
.env.dev | ||
.env.prod | ||
|
||
# CLI dir | ||
cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
.env | ||
.env | ||
.env.dev | ||
.env.prod |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
ARG BUILD_IMAGE_TAG=1.19-bullseye | ||
|
||
FROM golang:${BUILD_IMAGE_TAG} | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY go.mod go.sum . | ||
|
||
RUN go mod download | ||
|
||
RUN go install github.com/cosmtrek/air@latest && \ | ||
go install github.com/go-delve/delve/cmd/dlv@latest | ||
|
||
COPY . . | ||
|
||
EXPOSE 8000 | ||
|
||
CMD ["air", "-c", ".air.toml"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
version: "3.9" | ||
|
||
services: | ||
okane_api: | ||
container_name: okane_api | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.dev | ||
|
||
volumes: | ||
- type: bind | ||
source: . | ||
target: /usr/src/app | ||
|
||
ports: | ||
- "8000:8000" | ||
|
||
env_file: | ||
- '.env' | ||
|
||
links: | ||
- redis | ||
|
||
depends_on: | ||
- redis | ||
|
||
networks: | ||
- backend | ||
|
||
restart: unless-stopped | ||
|
||
redis: | ||
container_name: redis | ||
image: redis:6.2-alpine | ||
|
||
command: redis-server --save 20 1 --loglevel warning --requirepass foobar | ||
|
||
volumes: | ||
- redis_data:/data | ||
|
||
ports: | ||
- "6379:6379" | ||
|
||
networks: | ||
- backend | ||
|
||
restart: unless-stopped | ||
|
||
|
||
volumes: | ||
redis_data: | ||
|
||
networks: | ||
backend: |
This file was deleted.
Oops, something went wrong.