godash/compose.yml

126 lines
2.6 KiB
YAML
Raw Normal View History

2024-03-19 11:36:09 +01:00
networks:
net:
external: false
proxy:
external: false
2023-10-04 11:04:25 +02:00
2024-03-19 11:36:09 +01:00
services:
2024-03-18 21:54:35 +01:00
logto:
depends_on:
logto-db:
condition: service_healthy
2024-03-19 11:36:09 +01:00
image: svhd/logto:${V_LOGTO}
2024-03-18 21:54:35 +01:00
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
2024-03-19 11:36:09 +01:00
- ENDPOINT=http://0.0.0.0:3001
networks:
- net
- proxy
2024-03-18 21:54:35 +01:00
logto-db:
2024-03-19 11:36:09 +01:00
image: postgres:${V_POSTGRES}-alpine
2024-03-18 21:54:35 +01:00
user: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: p0stgr3s
healthcheck:
test: ['CMD-SHELL', 'pg_isready']
interval: 10s
timeout: 5s
retries: 5
2024-03-19 11:36:09 +01:00
networks:
- net
2024-03-18 21:54:35 +01:00
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
2024-03-19 11:36:09 +01:00
- PUBLIC_URL=http://localhost:4000
2024-03-18 21:58:09 +01:00
- LOG_LEVEL=debug
- TITLE=DEV
- APP_VERSION=v0.0.1-DEV
- WEATHER_KEY=${WEATHER_KEY}
- 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-19 11:36:09 +01:00
networks:
- proxy
2024-03-12 15:49:08 +01:00
templ:
2024-03-19 11:36:09 +01:00
profiles: [dev]
2024-03-12 15:49:08 +01:00
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-19 11:36:09 +01:00
profiles: [dev]
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-19 11:36:09 +01:00
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}
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/