-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docker): add Dockerfile and docker compose
- Loading branch information
Showing
3 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
node_modules | ||
coverage | ||
npm-debug.log | ||
*.pem | ||
.env | ||
.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
ARG DENO_VERSION=2.0.6 | ||
FROM denoland/deno:alpine-${DENO_VERSION} | ||
|
||
LABEL \ | ||
org.opencontainers.image.title="pull" \ | ||
org.opencontainers.image.description="Keep your forks up-to-date via automated PRs" \ | ||
org.opencontainers.image.url="https://github.com/wei/pull" \ | ||
org.opencontainers.image.documentation="https://github.com/wei/pull#readme" \ | ||
org.opencontainers.image.source="https://github.com/wei/pull" \ | ||
org.opencontainers.image.licenses="MIT" \ | ||
org.opencontainers.image.authors="Wei He <[email protected]>" \ | ||
maintainer="Wei He <[email protected]>" | ||
|
||
ENV \ | ||
#################### | ||
### Required ### | ||
#################### | ||
APP_ID= \ | ||
APP_NAME= \ | ||
WEBHOOK_SECRET= \ | ||
PRIVATE_KEY= \ | ||
#################### | ||
### Optional ### | ||
#################### | ||
#SENTRY_DSN= \ | ||
#GHE_HOST= \ | ||
PORT=3000 \ | ||
LOG_FORMAT=short \ | ||
LOG_LEVEL=info \ | ||
WEBHOOK_PATH=/api/github/webhooks \ | ||
CONFIG_FILENAME=pull.yml \ | ||
DEFAULT_MERGE_METHOD=hardreset \ | ||
_= | ||
|
||
# Set working directory | ||
WORKDIR /app | ||
|
||
# Copy dependency files | ||
# COPY deno.jsonc . | ||
# COPY import_map.json* . | ||
|
||
# Copy source code | ||
COPY . . | ||
|
||
# The app uses port 3000 by default | ||
EXPOSE 3000 | ||
|
||
# Command to run the app | ||
# CMD ["deno", "task", "dev"] | ||
# CMD ["deno", "task", "worker"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
services: | ||
app: | ||
build: . | ||
restart: unless-stopped | ||
ports: | ||
- "3000:3000" | ||
env_file: | ||
- ./.env | ||
depends_on: | ||
- mongodb | ||
- redis | ||
# volumes: | ||
# - .:/app | ||
command: deno task dev | ||
|
||
worker: | ||
build: . | ||
restart: unless-stopped | ||
env_file: | ||
- ./.env | ||
depends_on: | ||
- mongodb | ||
- redis | ||
- app | ||
# volumes: | ||
# - .:/app | ||
command: deno task worker | ||
|
||
mongodb: | ||
image: mongo:8 | ||
restart: unless-stopped | ||
environment: | ||
MONGO_INITDB_ROOT_USERNAME: root | ||
MONGO_INITDB_ROOT_PASSWORD: mongodb_password | ||
volumes: | ||
- mongodb-data:/data/db | ||
# ports: | ||
# - "27017:27017" | ||
|
||
redis: | ||
image: redis:7.4 | ||
restart: unless-stopped | ||
volumes: | ||
- redis-data:/data | ||
# ports: | ||
# - "6379:6379" | ||
|
||
volumes: | ||
mongodb-data: | ||
redis-data: |