Skip to content
Closed
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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@
/vendor/
adminer-plugins/
adminer-plugins.php

.env
83 changes: 83 additions & 0 deletions .mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"name": "AWS CDK Project MCP Configuration",
"mcpServers": {
"github": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-github"
],
"env": {},
"disabled": false
},
"mcp-server-git": {
"command": "uvx",
"args": [
"mcp-server-git@latest"
],
"env": {},
"disabled": false
},
"serena": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/oraios/serena",
"serena",
"start-mcp-server",
"--context",
"ide-assistant",
"--enable-web-dashboard",
"False"
]
},
"awslabs.cdk-mcp-server": {
"command": "uvx",
"args": [
"awslabs.cdk-mcp-server@latest"
],
"env": {
"FASTMCP_LOG_LEVEL": "ERROR",
"AWS_REGION": "ap-northeast-1",
"CDK_DEFAULT_REGION": "ap-northeast-1"
},
"disabled": false
},
"awslabs.aws-documentation-mcp-server": {
"command": "uvx",
"args": [
"awslabs.aws-documentation-mcp-server@latest"
],
"env": {
"FASTMCP_LOG_LEVEL": "ERROR",
"AWS_DOCUMENTATION_PARTITION": "aws"
},
"disabled": false
},
"mcp-server-bigquery": {
"command": "uvx",
"args": [
"mcp-server-bigquery@latest"
],
"env": {},
"disabled": false
},
"pdf-tools": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/hanweg/mcp-pdf-tools.git",
"pdf-tools"
],
"env": {},
"disabled": false
},
"mysql": {
"command": "uvx",
"args": [
"mysql_mcp_server"
],
"env": {}
}
}
}
7 changes: 7 additions & 0 deletions claud
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ANTHROPIC_MODEL=us.anthropic.claude-opus-4-1-20250805-v1:0 \
CLAUDE_CODE_USE_BEDROCK=1 \
AWS_REGION=us-west-2 \
ANTHROPIC_MODEL=us.anthropic.claude-sonnet-4-20250514-v1:0 \
ANTHROPIC_SMALL_FAST_MODEL=us.anthropic.claude-3-5-haiku-20241022-v1:0 \
claude --mcp-config .mcp.json --dangerously-skip-permissions

1 change: 1 addition & 0 deletions container/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.env
61 changes: 61 additions & 0 deletions container/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
FROM ubuntu:noble

ENV DEBIAN_FRONTEND=noninteractive

# システムの更新とDocker Composeのインストールに必要なパッケージのインストール
RUN --mount=type=cache,target=/var/lib/apt,sharing=locked \
--mount=type=cache,target=/var/cache/apt,sharing=locked \
apt-get update && \
apt-get install -y --no-install-recommends \
locales git wget unzip vim sudo nano \
curl apt-transport-https ca-certificates gnupg lsb-release \
&& \
# Dockerリポジトリの設定
install -m 0755 -d /etc/apt/keyrings && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
chmod a+r /etc/apt/keyrings/docker.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list && \
# Node.js v20 LTS リポジトリの設定
curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
apt-get update && \
apt-get install -y docker-ce docker-ce-cli containerd.io \
docker-buildx-plugin docker-compose-plugin nodejs && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN locale-gen en_US.UTF-8 && \
update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8

COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/

# aws cli
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip" && \
unzip -q awscliv2.zip && \
./aws/install && \
rm -rf aws awscliv2.zip

# github cli
RUN curl -sS https://webi.sh/gh | sh

RUN npm install -g \
@anthropic-ai/claude-code \
aws-cdk aws-cdk-lib typescript && \
npm cache clean --force

ARG USERNAME="ubuntu"

RUN usermod -aG users $USERNAME && \
echo '%users ALL=(ALL:ALL) NOPASSWD: ALL' > /etc/sudoers.d/users && \
echo "$USERNAME ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/$USERNAME && \
chmod 0440 /etc/sudoers.d/$USERNAME

USER ${USERNAME}
WORKDIR /home/${USERNAME}/work
VOLUME /home/${USERNAME}/work

COPY entrypoint.sh /usr/local/bin/entrypoint.sh

RUN git config --global credential.helper store

ENTRYPOINT [ "entrypoint.sh" ]

5 changes: 5 additions & 0 deletions container/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export U_ID=$(id -u)
export G_ID=$(id -g)
export DOCKER_GID=$(grep docker /etc/group | cut -d: -f3)
export COMPOSE_PROJECT_NAME=$(basename "$(dirname "$PWD")")
docker compose build --no-cache
24 changes: 24 additions & 0 deletions container/compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
services:

dev:
image: dev-${COMPOSE_PROJECT_NAME}:latest
build:
context: .
dockerfile: Dockerfile
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ~/.claude.json:/home/ubuntu/.claude.json
- ~/.serena:/home/ubuntu/.serena
- ~/.aws:/home/ubuntu/.aws
- ~/.gitconfig:/home/ubuntu/.gitconfig
- ~/.git-credentials:/home/ubuntu/.git-credentials
- ~/google_credential.json:/etc/google_credentials.json
- ~/.clasprc.json:/home/ubuntu/.clasprc.json
env_file: ../.env
user: "${U_ID}:${G_ID}"
group_add: ["${DOCKER_GID}"]
command: ["${GIT_USER}", "${GIT_REPO}", "tail", "-f", "/dev/null"]
networks:
- net
networks:
net:
8 changes: 8 additions & 0 deletions container/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export GIT_USER=takemi-ohama
export GIT_REPO=adminer
export U_ID=$(id -u)
export G_ID=$(id -g)
export DOCKER_GID=$(grep docker /etc/group | cut -d: -f3)
export COMPOSE_PROJECT_NAME=$(basename "$(dirname "$PWD")")
docker compose stop -t0
docker compose up -d --scale dev=3
6 changes: 6 additions & 0 deletions container/down.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
aws --profile carmo-dev s3 cp s3://nyle-devbase/carmo-screening/.env .env
export U_ID=$(id -u)
export G_ID=$(id -g)
export DOCKER_GID=$(grep docker /etc/group | cut -d: -f3)
export COMPOSE_PROJECT_NAME=$(basename "$(dirname "$PWD")")
docker compose down -t0
7 changes: 7 additions & 0 deletions container/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
user=$1
repo=$2
[ -d "$repo" ] && (cd "$repo" && git pull) || git clone "https://github.com/$user/$repo.git"
shift 2
[ -f "$repo/init.sh" ] && (cd "$repo" && ./init.sh)
$@
6 changes: 6 additions & 0 deletions container/login.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export U_ID=$(id -u)
export G_ID=$(id -g)
export DOCKER_GID=$(grep docker /etc/group | cut -d: -f3)
export COMPOSE_PROJECT_NAME=$(basename "$(dirname "$PWD")")
docker compose exec --index=${1:-1} dev bash

4 changes: 4 additions & 0 deletions init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
uv sync --link-mode=copy


Loading