2023-10-04 11:04:25 +02:00
|
|
|
services:
|
|
|
|
godash:
|
2024-03-12 15:49:08 +01:00
|
|
|
image: ${CURRENT_IMAGE}
|
2023-10-04 11:04:25 +02:00
|
|
|
build:
|
|
|
|
context: .
|
2024-03-12 15:49:08 +01:00
|
|
|
dockerfile: Dockerfile
|
2023-10-04 11:04:25 +02:00
|
|
|
args:
|
|
|
|
- GOLANG_VERSION=${GOLANG_VERSION}
|
|
|
|
- NODE_VERSION=${NODE_VERSION}
|
|
|
|
- ALPINE_VERSION=${ALPINE_VERSION}
|
2024-03-12 15:49:08 +01:00
|
|
|
- APP_VERSION=${CI_COMMIT_TAG}
|
2023-10-04 11:04:25 +02:00
|
|
|
|
|
|
|
backend:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile_inline: |
|
|
|
|
ARG GOLANG_VERSION
|
|
|
|
FROM golang:${GOLANG_VERSION}-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
|
|
|
|
|
|
|
RUN go install github.com/cosmtrek/air@latest
|
2024-03-12 15:49:08 +01:00
|
|
|
COPY scripts/.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:
|
|
|
|
- GOLANG_VERSION=${GOLANG_VERSION}
|
|
|
|
command: air -c .air.toml
|
|
|
|
environment:
|
|
|
|
- TZ=Europe/Berlin
|
|
|
|
- LOG_LEVEL=debug
|
|
|
|
- TITLE=DEV
|
|
|
|
- APP_VERSION=v0.0.1-dev
|
2024-03-12 15:49:08 +01:00
|
|
|
volumes:
|
|
|
|
- .:/app/
|
2023-10-04 11:04:25 +02:00
|
|
|
ports:
|
|
|
|
- 4000:4000
|
2024-03-12 15:49:08 +01:00
|
|
|
- 2345:2345
|
|
|
|
|
|
|
|
templ:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile_inline: |
|
|
|
|
ARG GOLANG_VERSION
|
|
|
|
FROM golang:${GOLANG_VERSION}-alpine
|
|
|
|
|
|
|
|
RUN go install github.com/a-h/templ/cmd/templ@latest
|
|
|
|
args:
|
|
|
|
- GOLANG_VERSION=${GOLANG_VERSION}
|
|
|
|
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:
|
2023-10-30 12:17:19 +01:00
|
|
|
image: node:${NODE_VERSION}-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]
|
|
|
|
image: golang:${GOLANG_VERSION}-alpine
|
|
|
|
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]
|
|
|
|
image: node:${NODE_VERSION}-alpine
|
2024-03-12 15:49:08 +01:00
|
|
|
working_dir: /app
|
2023-10-26 11:10:03 +02:00
|
|
|
volumes:
|
|
|
|
- .:/app/
|