126 lines
2.7 KiB
YAML
126 lines
2.7 KiB
YAML
networks:
|
|
net:
|
|
external: false
|
|
|
|
services:
|
|
backend:
|
|
profiles: [dev]
|
|
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/cosmtrek/air@latest
|
|
COPY .air.toml .
|
|
|
|
WORKDIR /app
|
|
COPY go.mod .
|
|
COPY go.sum .
|
|
RUN go mod download
|
|
args:
|
|
- V_GOLANG=${V_GOLANG}
|
|
command: air -c .air.toml
|
|
environment:
|
|
- TZ=Europe/Berlin
|
|
- PUBLIC_URL=${PUBLIC_URL}
|
|
- TITLE=${TITLE}
|
|
- APP_VERSION=${APP_VERSION}
|
|
- WEATHER_KEY=${WEATHER_KEY}
|
|
- LOGTO_ENDPOINT=${LOGTO_ENDPOINT}
|
|
- LOGTO_APP_ID=${LOGTO_APP_ID}
|
|
- LOGTO_APP_SECRET=${LOGTO_APP_SECRET}
|
|
- SESSION_KEY=${SESSION_KEY}
|
|
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
|
|
environment:
|
|
- TZ=Europe/Berlin
|
|
- PUBLIC_URL=${PUBLIC_URL}
|
|
- APP_VERSION=${APP_VERSION}
|
|
- WEATHER_KEY=${WEATHER_KEY}
|
|
- LOGTO_ENDPOINT=${LOGTO_ENDPOINT}
|
|
- LOGTO_APP_ID=${LOGTO_APP_ID}
|
|
- LOGTO_APP_SECRET=${LOGTO_APP_SECRET}
|
|
- SESSION_KEY=${SESSION_KEY}
|
|
volumes:
|
|
- .:/app/
|
|
ports:
|
|
- 4000:4000
|
|
- 4001:4001
|
|
|
|
templ:
|
|
profiles: [dev]
|
|
build:
|
|
context: .
|
|
dockerfile_inline: |
|
|
ARG V_GOLANG
|
|
FROM golang:${V_GOLANG}-alpine
|
|
|
|
RUN go install github.com/a-h/templ/cmd/templ@latest
|
|
args:
|
|
- V_GOLANG=${V_GOLANG}
|
|
working_dir: /app
|
|
command: templ generate --watch
|
|
volumes:
|
|
- .:/app/
|
|
|
|
tailwind:
|
|
profiles: [dev]
|
|
image: node:${V_NODE}-alpine
|
|
working_dir: /app
|
|
command: yarn tw:dev
|
|
tty: true
|
|
volumes:
|
|
- .:/app/
|
|
|
|
godash:
|
|
profiles: [build]
|
|
image: ${CURRENT_IMAGE}
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
args:
|
|
- V_GOLANG=${V_GOLANG}
|
|
- V_NODE=${V_NODE}
|
|
- V_ALPINE=${V_ALPINE}
|
|
- APP_VERSION=${CI_COMMIT_TAG}
|
|
|
|
golang:
|
|
profiles: [install]
|
|
image: golang:${V_GOLANG}-alpine
|
|
working_dir: /app
|
|
volumes:
|
|
- .:/app/
|
|
|
|
node:
|
|
profiles: [install]
|
|
image: node:${V_NODE}-alpine
|
|
working_dir: /app
|
|
volumes:
|
|
- .:/app/
|