101 lines
2.1 KiB
YAML
101 lines
2.1 KiB
YAML
services:
|
|
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}
|
|
|
|
logto:
|
|
depends_on:
|
|
logto-db:
|
|
condition: service_healthy
|
|
image: svhd/logto:latest
|
|
entrypoint: ['sh', '-c', 'npm run cli db seed -- --swe && npm start']
|
|
ports:
|
|
- 3001:3001
|
|
- 3002:3002
|
|
environment:
|
|
- TRUST_PROXY_HEADER=1
|
|
- DB_URL=postgres://postgres:p0stgr3s@logto-db:5432/logto
|
|
|
|
logto-db:
|
|
image: postgres:14-alpine
|
|
user: postgres
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: p0stgr3s
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'pg_isready']
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
backend:
|
|
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
|
|
env_file: .env
|
|
volumes:
|
|
- .:/app/
|
|
ports:
|
|
- 4000:4000
|
|
- 2345:2345
|
|
|
|
templ:
|
|
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:
|
|
image: node:${V_NODE}-alpine
|
|
working_dir: /app
|
|
command: yarn tw:dev
|
|
tty: true
|
|
volumes:
|
|
- .:/app/
|
|
|
|
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/
|