godash/compose.yml

112 lines
2.4 KiB
YAML
Raw Normal View History

2023-10-04 11:04:25 +02:00
services:
godash:
2024-03-12 16:16:49 +01:00
profiles: [build]
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:
2024-03-13 11:51:52 +01:00
- V_GOLANG=${V_GOLANG}
- V_NODE=${V_NODE}
- V_ALPINE=${V_ALPINE}
2024-03-12 15:49:08 +01:00
- APP_VERSION=${CI_COMMIT_TAG}
2023-10-04 11:04:25 +02:00
2024-03-18 21:54:35 +01:00
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
2023-10-04 11:04:25 +02:00
backend:
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
RUN go install github.com/cosmtrek/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-18 21:58:09 +01:00
environment:
- TZ=Europe/Berlin
- PUBLIC_URL=http://godash:4000
- LOG_LEVEL=debug
- TITLE=DEV
- APP_VERSION=v0.0.1-DEV
- WEATHER_KEY=${WEATHER_KEY}
- LOGTO_ENDPOINT=${LOGTO_ENDPOINT}
- LOGTO_APP_ID=${LOGTO_APP_ID}
- LOGTO_APP_SECRET=${LOGTO_APP_SECRET}
- SESSION_KEY=super-secure
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: |
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-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/