godash/compose.yml

100 lines
1.9 KiB
YAML
Raw Normal View History

2024-03-19 11:36:09 +01:00
networks:
net:
external: false
2023-10-04 11:04:25 +02:00
2024-03-19 11:36:09 +01:00
services:
2023-10-04 11:04:25 +02:00
backend:
2024-03-26 10:25:19 +01:00
profiles: [dev]
2023-10-04 11:04:25 +02:00
build:
context: .
dockerfile_inline: |
2024-03-13 11:51:52 +01:00
ARG V_GOLANG
FROM golang:${V_GOLANG}-alpine
2024-03-12 15:49:08 +01:00
RUN apk update && \
apk upgrade && \
apk add tzdata
2023-10-26 11:10:03 +02:00
2024-06-11 11:27:07 +02:00
RUN go install github.com/air-verse/air@latest
2024-03-12 16:16:49 +01:00
COPY .air.toml .
2023-10-26 11:10:03 +02:00
2023-10-04 11:04:25 +02:00
WORKDIR /app
2024-03-12 15:49:08 +01:00
COPY go.mod .
COPY go.sum .
2023-10-04 11:04:25 +02:00
RUN go mod download
args:
2024-03-13 11:51:52 +01:00
- V_GOLANG=${V_GOLANG}
2023-10-04 11:04:25 +02:00
command: air -c .air.toml
2024-03-30 00:27:23 +01:00
env_file:
- .env
2024-03-26 10:25:19 +01:00
volumes:
- .:/app/
ports:
- 4000:4000
backend-debug:
profiles: [debug]
build:
context: .
dockerfile_inline: |
ARG V_GOLANG
FROM golang:${V_GOLANG}-alpine
RUN apk update && \
apk upgrade && \
apk add tzdata
RUN go install github.com/go-delve/delve/cmd/dlv@latest
WORKDIR /app
COPY go.mod .
COPY go.sum .
RUN go mod download
args:
- V_GOLANG=${V_GOLANG}
command: /app/scripts/debug.sh
2024-03-30 00:27:23 +01:00
env_file:
- .env
2024-03-12 15:49:08 +01:00
volumes:
- .:/app/
2023-10-04 11:04:25 +02:00
ports:
- 4000:4000
2024-03-26 10:25:19 +01:00
- 4001:4001
2024-03-12 15:49:08 +01:00
templ:
2024-03-19 11:36:09 +01:00
profiles: [dev]
2024-03-12 15:49:08 +01:00
build:
context: .
dockerfile_inline: |
2024-03-13 11:51:52 +01:00
ARG V_GOLANG
FROM golang:${V_GOLANG}-alpine
2024-03-12 15:49:08 +01:00
RUN go install github.com/a-h/templ/cmd/templ@latest
args:
2024-03-13 11:51:52 +01:00
- V_GOLANG=${V_GOLANG}
2024-03-12 15:49:08 +01:00
working_dir: /app
command: templ generate --watch
2023-10-04 11:04:25 +02:00
volumes:
2023-10-26 11:10:03 +02:00
- .:/app/
2023-10-04 11:04:25 +02:00
2024-03-12 15:49:08 +01:00
tailwind:
2024-03-19 11:36:09 +01:00
profiles: [dev]
2024-03-13 11:51:52 +01:00
image: node:${V_NODE}-alpine
2024-03-12 15:49:08 +01:00
working_dir: /app
command: yarn tw:dev
2023-10-04 11:04:25 +02:00
tty: true
volumes:
2023-10-26 11:10:03 +02:00
- .:/app/
2023-10-05 10:17:58 +02:00
2024-03-12 15:49:08 +01:00
golang:
2023-10-05 10:17:58 +02:00
profiles: [install]
2024-03-13 11:51:52 +01:00
image: golang:${V_GOLANG}-alpine
2023-10-05 10:17:58 +02:00
working_dir: /app
volumes:
2023-10-26 11:10:03 +02:00
- .:/app/
2024-03-12 15:49:08 +01:00
node:
2023-10-26 11:10:03 +02:00
profiles: [install]
2024-03-13 11:51:52 +01:00
image: node:${V_NODE}-alpine
2024-03-12 15:49:08 +01:00
working_dir: /app
2023-10-26 11:10:03 +02:00
volumes:
- .:/app/