-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reverts commit 996b882.
- Loading branch information
Showing
31 changed files
with
1,002 additions
and
352 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,63 @@ | ||
# Config file for [Air](https://github.com/cosmtrek/air) in TOML format | ||
|
||
# Working directory | ||
# . or absolute path, please note that the directories following must be under root. | ||
root = "." | ||
tmp_dir = "tmp" | ||
|
||
[build] | ||
# Just plain old shell command. You could use `make` as well. | ||
cmd = "go build -o ./tmp/runner-build -buildvcs=false ." | ||
# Binary file yields from `cmd`. | ||
bin = "tmp/runner-build" | ||
# Customize binary, can setup environment variables when run your app. | ||
full_bin = "APP_ENV=dev APP_USER=air ./tmp/runner-build" | ||
# Watch these filename extensions. | ||
include_ext = ["go"] | ||
# Ignore these filename extensions or directories. | ||
exclude_dir = [] | ||
# Watch these directories if you specified. | ||
include_dir = [] | ||
# Watch these files. | ||
include_file = [] | ||
# Exclude files. | ||
exclude_file = [] | ||
# Exclude specific regular expressions. | ||
exclude_regex = ["_test\\.go"] | ||
# Exclude unchanged files. | ||
exclude_unchanged = true | ||
# Follow symlink for directories | ||
follow_symlink = true | ||
# This log file places in your tmp_dir. | ||
log = "air.log" | ||
# It's not necessary to trigger build each time file changes if it's too frequent. | ||
delay = 0 # ms | ||
# Stop running old binary when build errors occur. | ||
stop_on_error = true | ||
# Send Interrupt signal before killing process (windows does not support this feature) | ||
send_interrupt = false | ||
# Delay after sending Interrupt signal | ||
kill_delay = 500 # ms | ||
# Rerun binary or not | ||
rerun = false | ||
# Delay after each executions | ||
rerun_delay = 500 | ||
# Add additional arguments when running binary (bin/full_bin). Will run './tmp/main hello world'. | ||
args_bin = [] | ||
|
||
[log] | ||
# Show log time | ||
time = false | ||
# Only show main log (silences watcher, build, runner) | ||
main_only = false | ||
|
||
[color] | ||
# Customize each part's color. If no color found, use the raw app log. | ||
main = "magenta" | ||
watcher = "cyan" | ||
build = "yellow" | ||
runner = "green" | ||
|
||
[misc] | ||
# Delete tmp directory on exit | ||
clean_on_exit = 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
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
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,17 +1,16 @@ | ||
FROM golang:1.15.0-alpine AS build | ||
FROM golang:1.20.0-alpine AS build | ||
ENV CGO_ENABLED=0 | ||
ENV DOCKERIZE_VERSION v0.6.1 | ||
RUN apk add --update --no-cache git && \ | ||
apk --update add tzdata && \ | ||
cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime && \ | ||
apk del tzdata && \ | ||
rm -rf /var/cache/apk/* | ||
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz && \ | ||
tar -C /usr/local/bin -xzvf dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz && \ | ||
rm dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz | ||
|
||
WORKDIR /go/src/github.com/traPtitech/booQ | ||
RUN go get github.com/pilu/fresh | ||
COPY ./go.* ./ | ||
WORKDIR /app | ||
RUN go install github.com/cosmtrek/air@latest | ||
|
||
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
COPY . . | ||
|
||
CMD ["air"] |
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,47 @@ | ||
version: "3" | ||
services: | ||
db: | ||
image: mariadb:10.6.4 | ||
environment: | ||
MYSQL_ROOT_PASSWORD: password | ||
MYSQL_DATABASE: booq | ||
MYSQL_USERNAME: root | ||
MYSQL_PASSWORD: password | ||
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci | ||
expose: | ||
- '3306' | ||
ports: | ||
- '3306:3306' | ||
healthcheck: | ||
test: mysqladmin ping -h 127.0.0.1 -u$$MYSQL_USERNAME -p$$MYSQL_ROOT_PASSWORD | ||
interval: 6s | ||
timeout: 60s | ||
retries: 20 | ||
start_period: 5s | ||
|
||
booq-server: | ||
build: . | ||
environment: | ||
BOOQ_ENV: development | ||
MYSQL_HOST: db | ||
MYSQL_USER: root | ||
MYSQL_PASSWORD: password | ||
MYSQL_DATABASE: booq | ||
DEBUG_USER_NAME: ryoha | ||
volumes: | ||
- './:/app' | ||
tty: true | ||
ports: | ||
- '8080:3001' | ||
depends_on: | ||
db: | ||
condition: service_healthy | ||
|
||
swagger: | ||
image: swaggerapi/swagger-ui | ||
volumes: | ||
- ./docs/swagger.yml:/usr/share/nginx/html/sample.yaml | ||
environment: | ||
API_URL: sample.yaml | ||
ports: | ||
- "4000:8080" |
Oops, something went wrong.