Upon executing docker compose up, receiving the following output
Attaching to gerbil, pangolin, traefik
pangolin |
pangolin | > @fosrl/pangolin@1.0.0-beta.1 start
pangolin | > NODE_OPTIONS=--enable-source-maps NODE_ENV=development ENVIRONMENT=prod sh -c 'node dist/migrations.mjs && node dist/server.mjs'
pangolin |
pangolin | /app/node_modules/better-sqlite3/lib/database.js:65
pangolin | throw new TypeError('Cannot open database because the directory does not exist');
pangolin | ^
pangolin |
pangolin | TypeError: Cannot open database because the directory does not exist
pangolin | at new Database (/app/node_modules/better-sqlite3/lib/database.js:65:9)
pangolin | at <anonymous> (/app/server/db/index.ts:11:16)
pangolin |
pangolin | Node.js v20.18.1
Gracefully stopping... (press Ctrl+C again to force)
dependency failed to start: container pangolin is unhealthy
My docker-compose.yml is the default:
services:
pangolin:
image: fosrl/pangolin:1.0.0-beta.1
container_name: pangolin
restart: unless-stopped
ports:
- 3001:3001
- 3000:3000
volumes:
- ./config:/app/config
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3001/api/v1/"]
interval: "3s"
timeout: "3s"
retries: 5
gerbil:
image: fosrl/gerbil:1.0.0-beta.1
container_name: gerbil
restart: unless-stopped
depends_on:
pangolin:
condition: service_healthy
command:
- --reachableAt=http://gerbil:3003
- --generateAndSaveKeyTo=/var/config/key
- --remoteConfig=http://pangolin:3001/api/v1/gerbil/get-config
- --reportBandwidthTo=http://pangolin:3001/api/v1/gerbil/receive-bandwidth
volumes:
- ./config/:/var/config
cap_add:
- NET_ADMIN
- SYS_MODULE
ports:
- 51820:51820/udp
- 8080:8080 # Port for traefik because of the network_mode
- 443:443 # Port for traefik because of the network_mode
- 80:80 # Port for traefik because of the network_mode
traefik:
image: traefik:v3.1
container_name: traefik
restart: unless-stopped
network_mode: service:gerbil # Ports appear on the gerbil service
depends_on:
pangolin:
condition: service_healthy
command:
- --configFile=/etc/traefik/traefik_config.yml
volumes:
- ./traefik:/etc/traefik:ro # Volume to store the Traefik configuration
- ./letsencrypt:/letsencrypt # Volume to store the Let's Encrypt certificates
Originally created by @sidelkins on GitHub (Jan 7, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/6
Upon executing `docker compose up`, receiving the following output
```
Attaching to gerbil, pangolin, traefik
pangolin |
pangolin | > @fosrl/pangolin@1.0.0-beta.1 start
pangolin | > NODE_OPTIONS=--enable-source-maps NODE_ENV=development ENVIRONMENT=prod sh -c 'node dist/migrations.mjs && node dist/server.mjs'
pangolin |
pangolin | /app/node_modules/better-sqlite3/lib/database.js:65
pangolin | throw new TypeError('Cannot open database because the directory does not exist');
pangolin | ^
pangolin |
pangolin | TypeError: Cannot open database because the directory does not exist
pangolin | at new Database (/app/node_modules/better-sqlite3/lib/database.js:65:9)
pangolin | at <anonymous> (/app/server/db/index.ts:11:16)
pangolin |
pangolin | Node.js v20.18.1
Gracefully stopping... (press Ctrl+C again to force)
dependency failed to start: container pangolin is unhealthy
```
My docker-compose.yml is the default:
```
services:
pangolin:
image: fosrl/pangolin:1.0.0-beta.1
container_name: pangolin
restart: unless-stopped
ports:
- 3001:3001
- 3000:3000
volumes:
- ./config:/app/config
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3001/api/v1/"]
interval: "3s"
timeout: "3s"
retries: 5
gerbil:
image: fosrl/gerbil:1.0.0-beta.1
container_name: gerbil
restart: unless-stopped
depends_on:
pangolin:
condition: service_healthy
command:
- --reachableAt=http://gerbil:3003
- --generateAndSaveKeyTo=/var/config/key
- --remoteConfig=http://pangolin:3001/api/v1/gerbil/get-config
- --reportBandwidthTo=http://pangolin:3001/api/v1/gerbil/receive-bandwidth
volumes:
- ./config/:/var/config
cap_add:
- NET_ADMIN
- SYS_MODULE
ports:
- 51820:51820/udp
- 8080:8080 # Port for traefik because of the network_mode
- 443:443 # Port for traefik because of the network_mode
- 80:80 # Port for traefik because of the network_mode
traefik:
image: traefik:v3.1
container_name: traefik
restart: unless-stopped
network_mode: service:gerbil # Ports appear on the gerbil service
depends_on:
pangolin:
condition: service_healthy
command:
- --configFile=/etc/traefik/traefik_config.yml
volumes:
- ./traefik:/etc/traefik:ro # Volume to store the Traefik configuration
- ./letsencrypt:/letsencrypt # Volume to store the Let's Encrypt certificates
```
If you confirm you already have this, then I can troubleshoot further.
<!-- gh-comment-id:2574182422 -->
@miloschwartz commented on GitHub (Jan 7, 2025):
Hi, first I want to check to make sure you have the correct folder structure passed as a volume. Should be like:
```
.
├── config/
│ ├── config.yml
│ ├── db/
│ │ └── db.sqlite (generated)
│ ├── key (generated)
│ ├── letsencrypt/
│ │ └── acme.json (generated)
│ ├── logs/
│ └── traefik/
│ ├── traefik_config.yml
│ └── dynamic_config.yml
└── docker-compose.yml
```
The important one is the presence of `config/db/`.
If you confirm you already have this, then I can troubleshoot further.
Pangolin will now attempt to bootstrap the volume and create the needed paths. Hope that helps!
<!-- gh-comment-id:2585930993 -->
@miloschwartz commented on GitHub (Jan 12, 2025):
Pangolin will now attempt to bootstrap the volume and create the needed paths. Hope that helps!
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @sidelkins on GitHub (Jan 7, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/6
Upon executing
docker compose up, receiving the following outputMy docker-compose.yml is the default:
@miloschwartz commented on GitHub (Jan 7, 2025):
Hi, first I want to check to make sure you have the correct folder structure passed as a volume. Should be like:
The important one is the presence of
config/db/.If you confirm you already have this, then I can troubleshoot further.
@miloschwartz commented on GitHub (Jan 12, 2025):
Pangolin will now attempt to bootstrap the volume and create the needed paths. Hope that helps!