godash/compose.yml

80 lines
1.7 KiB
YAML

services:
godash:
profiles: [build]
image: ${CURRENT_IMAGE}
build:
context: .
dockerfile: Dockerfile
args:
- GOLANG_VERSION=${GOLANG_VERSION}
- NODE_VERSION=${NODE_VERSION}
- ALPINE_VERSION=${ALPINE_VERSION}
- APP_VERSION=${CI_COMMIT_TAG}
backend:
build:
context: .
dockerfile_inline: |
ARG GOLANG_VERSION
FROM golang:${GOLANG_VERSION}-alpine
RUN apk update && \
apk upgrade && \
apk add tzdata
RUN go install github.com/cosmtrek/air@latest
COPY .air.toml .
WORKDIR /app
COPY go.mod .
COPY go.sum .
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
volumes:
- .:/app/
ports:
- 4000:4000
- 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
volumes:
- .:/app/
tailwind:
image: node:${NODE_VERSION}-alpine
working_dir: /app
command: yarn tw:dev
tty: true
volumes:
- .:/app/
golang:
profiles: [install]
image: golang:${GOLANG_VERSION}-alpine
working_dir: /app
volumes:
- .:/app/
node:
profiles: [install]
image: node:${NODE_VERSION}-alpine
working_dir: /app
volumes:
- .:/app/