Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: frontend containerのビルド時にtraQ-S_UIをダウンロードしてくる #2559

Merged
merged 4 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/renovate/regex-manager.json5
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
{
"description": "GitHub URL dependencies",
"fileMatch": [
".+\\.ya?ml$", "(^|/)Makefile$"
".+\\.ya?ml$", "(^|/)Makefile$", "^Dockerfile.*"
],
"matchStrings": [
// Example: kustomize build https://github.com/argoproj/argo-cd//manifests/crds?ref=v2.7.6 | kubectl create -f -
Expand Down
11 changes: 0 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,6 @@ db-lint: ## Lint db docs according to .tbls.yml
TRAQ_MARIADB_PORT=$(TEST_DB_PORT) go run main.go migrate --reset
docker run --rm --net=host -e TBLS_DSN="mariadb://root:[email protected]:$(TEST_DB_PORT)/traq" -v $$PWD:/work -w /work ghcr.io/k1low/tbls:$(TBLS_VERSION) lint -c .tbls.yml

.PHONY: update-frontend
update-frontend: ## Update frontend files in dev/frontend
@mkdir -p ./dev/frontend
# renovate:github-url
@curl -L -Ss https://github.com/traPtitech/traQ_S-UI/releases/download/v3.22.1/dist.tar.gz | tar zxv -C ./dev/frontend/ --strip-components=2

.PHONY: reset-frontend
reset-frontend: ## Completely replace frontend files in dev/frontend
rm -rf ./dev/frontend
@make update-frontend

.PHONY: up
up: ## Build and start the app containers
@docker compose up -d --build
Expand Down
7 changes: 3 additions & 4 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,16 @@ services:
- app:/app/storage

frontend:
image: caddy:2.9.1-alpine
build:
context: ./dev
dockerfile: Dockerfile-frontend
restart: always
expose:
- "80"
ports:
- "3000:80"
depends_on:
- backend
volumes:
- ./dev/Caddyfile:/etc/caddy/Caddyfile:ro
- ./dev/frontend:/usr/share/caddy:ro

mysql:
image: mariadb:10.11.10
Expand Down
5 changes: 5 additions & 0 deletions dev/Dockerfile-frontend
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM caddy:2.9.1-alpine

COPY ./Caddyfile /etc/caddy/Caddyfile

RUN wget -O - https://github.com/traPtitech/traQ_S-UI/releases/download/v3.22.1/dist.tar.gz | tar zxv -C /usr/share/caddy/ --strip-components=2
5 changes: 1 addition & 4 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ If you want to contribute to traQ, then follow this section.
### Setup Local Server with Docker

#### First Up (or entirely rebuild)
`make update-frontend && make up`
`make up`

Now you can access to
+ `http://localhost:3000` for traQ
Expand All @@ -30,9 +30,6 @@ Now you can access to
#### Rebuild traQ
`make up`

#### Update frontend
`make update-frontend` or `make reset-frontend`

#### Destroy Containers
`make down`

Expand Down
Loading