-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path_docker-compose.dev.yaml
More file actions
74 lines (71 loc) · 2.4 KB
/
_docker-compose.dev.yaml
File metadata and controls
74 lines (71 loc) · 2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
## 別の人が同じディレクトリ名を使用している場合は変更してください。
name: unibot
services:
bot:
container_name: unibot
build: .
# 別の人が同じように使用している場合はイメージの競合を防ぐため、変更してください。
# 例: yuito-it/unibot:latest
image: unibot:latest
restart: always
volumes:
#change this to your local path
- /path/to/ssh/key:/root/.ssh/privatekey
- /path/to/ssh/pubkey:/root/.ssh/pubkey
env_file: .env
command: >
bash -c "
set -e
git config --global user.name \"$GIT_USER_NAME\" && git config --global user.email \"$GIT_USER_EMAIL\" &&
# SSH Settings (SSH)
chmod 600 /root/.ssh/privatekey &&
eval \$(ssh-agent -s) &&
ssh-add /root/.ssh/privatekey &&
mkdir -p /root/.ssh &&
chmod 600 /root/.ssh/privatekey &&
mkdir -p /root/.config/git &&
echo -e \"$GIT_USER_EMAIL $(cat /root/.ssh/pubkey)\" > /root/.config/git/allowed_signers &&
git remote rm origin && git remote add origin \"git@github.com:UniPro-tech/UniBot.git\" &&
# Set Git Signing (SSH)
git config --global gpg.format ssh &&
git config --global user.signingkey ~/.ssh/privatekey &&
git config --global commit.gpgsign true && git config --global tag.gpgsign true &&
# Authenticate with GitHub (HTTPS) # gh auth login --with-token <<< \"$GIT_TOKEN\" &&
cd /app &&
bunx prisma generate &&
bunx prisma migrate dev --name init &&
bun run --watch src/index.ts
"
depends_on:
- mongo
mongo:
image: mongo:6.0.6
environment:
- AUTH=no
command: [--replSet, my-replica-set, --noauth, --bind_ip_all]
ports:
- 27017:27017
healthcheck:
test: mongosh mongo-init.js
interval: 10s
start_period: 30s
volumes:
- mongodb_data:/data/db
- ./mongo-init.js:/mongo-init.js
restart: always
mongo-express:
image: mongo-express
container_name: mongo_express
restart: always
ports:
- 8081:8081
environment:
#ME_CONFIG_MONGODB_URL: mongodb://@mongo:27017/
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: password
ME_CONFIG_MONGODB_SERVER: mongo
ME_CONFIG_MONGODB_PORT: 27017
depends_on:
- mongo
volumes:
mongodb_data: