diff --git a/Dockerfile b/Dockerfile index 5b99221..3e0e0ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,8 +9,7 @@ COPY requirements.txt /app/ RUN pip install --no-cache-dir -r requirements.txt COPY main.py /app/ -COPY proto/gen /app/proto/gen -COPY src /app/src +COPY memos_webhook /app/memos_webhook # Make port 8000 available to the environment outside this container EXPOSE 8000 diff --git a/Makefile b/Makefile index 95ed265..4b1b07b 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ update_deps: @./proto/update_deps.sh run: - @./run.sh + @./tests/run.sh freeze: @pip freeze > requirements.txt diff --git a/run.sh b/run.sh deleted file mode 100755 index b7e36c4..0000000 --- a/run.sh +++ /dev/null @@ -1 +0,0 @@ -docker-compose -f docker_compose.yaml up -d \ No newline at end of file diff --git a/tests/.gitignore b/tests/.gitignore new file mode 100644 index 0000000..b79834a --- /dev/null +++ b/tests/.gitignore @@ -0,0 +1 @@ +.download \ No newline at end of file diff --git a/docker_compose.yaml b/tests/docker_compose.yaml similarity index 65% rename from docker_compose.yaml rename to tests/docker_compose.yaml index 79b186a..bfa4670 100644 --- a/docker_compose.yaml +++ b/tests/docker_compose.yaml @@ -2,19 +2,16 @@ version: "3.0" services: memos: networks: - - memos + - memos_webhook_test image: neosmemo/memos:0.22.1 - container_name: memos ports: - - 5230:5230 + - 5240:5230 webhook: - image: ghcr.io/ryojerryyu/memos-webhook-py:test networks: - - memos + - memos_webhook_test build: - context: . + context: .. dockerfile: Dockerfile - container_name: webhook environment: - LOG_LEVEL=debug - MEMOS_HOST=memos @@ -24,4 +21,4 @@ services: - ./.download:/app/download networks: - memos: \ No newline at end of file + memos_webhook_test: \ No newline at end of file diff --git a/tests/run.sh b/tests/run.sh new file mode 100755 index 0000000..b400aef --- /dev/null +++ b/tests/run.sh @@ -0,0 +1 @@ +docker-compose -f tests/docker_compose.yaml up -d \ No newline at end of file