Skip to content

Commit

Permalink
Merge pull request #777 from traPtitech/dokka-n
Browse files Browse the repository at this point in the history
:docker_ga_dokka-n.ex-large:
  • Loading branch information
H1rono authored Jun 30, 2024
2 parents 372aea3 + 49150b5 commit d680332
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 61 deletions.
49 changes: 0 additions & 49 deletions .air.toml

This file was deleted.

11 changes: 4 additions & 7 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM golang:1.22.3-alpine as build
ENV DOCKERIZE_VERSION v0.6.1
ENV CGO_ENABLED 0
ENV TZ Asia/Tokyo

Expand All @@ -13,13 +12,11 @@ RUN apk --update --no-cache add tzdata \
RUN apk --update --no-cache add ca-certificates \
&& update-ca-certificates

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

RUN go install github.com/air-verse/air@latest

WORKDIR /src

COPY go.mod go.sum ./
RUN go mod download

COPY . .

CMD [ "go", "run", "main.go" ]
28 changes: 23 additions & 5 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ services:
build:
context: ./
dockerfile: ./Dockerfile.dev
entrypoint: dockerize -wait tcp://db:3306 -timeout 60s
command: "air -c .air.toml"
environment:
MARIADB_USERNAME: root
MARIADB_PASSWORD: password
Expand All @@ -26,13 +24,21 @@ services:
ports:
- "1323:1323"
volumes:
- "./:/src"
- "./uploads:/src/uploads"
depends_on:
- db
db:
condition: service_healthy
tty: true
develop:
watch:
- path: ./
action: sync+restart
target: /src
ignore:
- uploads

db:
image: mariadb:10.3.29
image: mariadb:10.11.4
restart: always
environment:
MYSQL_ROOT_PASSWORD: password
Expand All @@ -45,6 +51,18 @@ services:
- "3306"
ports:
- "3306:3306"
healthcheck:
test: [
"CMD",
"healthcheck.sh",
"--su-mysql",
"--connect",
"--innodb_initialized"
]
interval: 10s
timeout: 5s
start_period: 5s
retries: 3

phpmyadmin:
image: phpmyadmin/phpmyadmin
Expand Down

0 comments on commit d680332

Please sign in to comment.