Skip to content
Open

Gg #99

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
32 changes: 32 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
{
"name": "Existing Dockerfile",
"build": {
// Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerfile": "../Dockerfile"
},
"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {},
"ghcr.io/devcontainers/features/git-lfs:1": {},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/node:1": {}
}

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Uncomment the next line to run commands after the container is created.
// "postCreateCommand": "cat /etc/os-release",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "devcontainer"
}
47 changes: 24 additions & 23 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
.git/
.gitignore
.dockerignore
docker-compose*
Dockerfile
makefile
htmlcov/
coverage.xml
.coverage*

.vscode/
*.dat

.DS_Store
node_modules
/build
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
.idea
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/charts
**/docker-compose*
**/compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for more information:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://containers.dev/guide/dependabot

version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
63 changes: 63 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"configurations": [
{
"name": "Attach to Chrome",
"port": 9222,
"request": "attach",
"type": "chrome",
"webRoot": "+-"
},
{
"name": "Attach",
"port": 9229,
"request": "attach",
"skipFiles": [
"<node_internals>/**"
],
"type": "node"
},
{
"name": "Docker Node.js Launch",
"type": "docker",
"request": "launch",
"preLaunchTask": "docker-run: debug",
"platform": "node"
},
{
"name": "Python Debugger: Current File with Arguments",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"args": "${command:pickArgs}"
},
{
"name": "Python Debugger: Current File",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
},
{
"name": "Python Debugger: Module",
"type": "debugpy",
"request": "launch",
"module": "${input:moduleName}",
"console": "integratedTerminal"
},
{
"name": "Python Debugger: Django",
"type": "debugpy",
"request": "launch",
"module": "${input:moduleName}",
"console": "integratedTerminal"
},
{
"name": "Containers: Node.js Launch",
"type": "docker",
"request": "launch",
"preLaunchTask": "docker-run: debug",
"platform": "node"
}
]
}
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"python.testing.pytestArgs": [
"tests"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
39 changes: 39 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "docker-build",
"label": "docker-build",
"platform": "node",
"dockerBuild": {
"dockerfile": "${workspaceFolder}/Dockerfile",
"context": "${workspaceFolder}",
"pull": true
}
},
{
"type": "docker-run",
"label": "docker-run: release",
"dependsOn": [
"docker-build"
],
"platform": "node"
},
{
"type": "docker-run",
"label": "docker-run: debug",
"dependsOn": [
"docker-build"
],
"dockerRun": {
"env": {
"DEBUG": "*",
"NODE_ENV": "development"
}
},
"node": {
"enableDebugging": true
}
}
]
}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## [4.1.0](https://github.com/subnub/myDrive/compare/v4.0.2...v4.1.0) (2025-03-09)


### Features

* Add block account creation ([#80](https://github.com/subnub/myDrive/issues/80)) ([fc48827](https://github.com/subnub/myDrive/commit/fc48827338c3eb5632249e34dcc1f5b8d1c61031))
* **docker:** add MongoDB and improve setup instructions ([#82](https://github.com/subnub/myDrive/issues/82)) ([b82c366](https://github.com/subnub/myDrive/commit/b82c3665a1fb72964237b154facb29b0ea891768))


### Bug Fixes

* removed unneeded package that was also causing build issues ([ceb0866](https://github.com/subnub/myDrive/commit/ceb08661740de7690df525d9f1ee55d767032eeb))

## 4.0.2 (2025-03-01)


Expand Down
20 changes: 7 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
FROM node:20-alpine AS builder

# Install build dependencies
RUN apk add --no-cache python3 make g++ ffmpeg && \
ln -sf python3 /usr/bin/python

WORKDIR /usr/app-production
COPY package*.json ./

RUN npm install

FROM node:lts-alpine
ENV NODE_ENV=production
WORKDIR /usr/src/app
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
RUN npm install --production --silent
COPY . .
RUN npm run build

Expand All @@ -28,5 +22,5 @@ COPY --from=builder /usr/app-production .

EXPOSE 8080
EXPOSE 3000

CMD ["npm", "run", "start"]
USER node
CMD ["npm", "start"]
12 changes: 12 additions & 0 deletions docker-compose.debug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
services:
mydrive:
image: mydrive
build:
context: .
dockerfile: ./Dockerfile
environment:
NODE_ENV: development
ports:
- 3000:3000
- 9229:9229
command: ["node", "--inspect=0.0.0.0:9229", "index.js"]
55 changes: 9 additions & 46 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,10 @@
services:
app:
container_name: mydrive
image: kylehoell/mydrive:latest
volumes:
# Use the following volumes section if you want to use bind mounts:
# - /path/to/data:/data/
# - /path/to/temp:/temp/

# Use the following volumes section if you want to use named volumes:
- mydrive-data:/data/
- mydrive-temp:/temp/
ports:
- "${HTTP_PORT:-3000}:3000"
# Optional: Uncomment the following line if you want to use HTTPS
#- "${HTTPS_PORT:-8080}:8080"

# Use expose: if using a reverse proxy
# expose:
# - 3000
# - 8080
env_file:
- .env # Copy .env.example to .env and fill in the values

mongo:
image: mongo:8
container_name: mongo
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: username
MONGO_INITDB_ROOT_PASSWORD: password
expose:
- 27017
volumes:
- db-data:/data/db
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
timeout: 10s
interval: 10s
retries: 10
start_period: 10s

# Use the following volumes section if you want to use named volumes.
volumes:
mydrive-data:
mydrive-temp:
db-data:
mydrive:
image: mydrive
build:
context: .
dockerfile: ./Dockerfile
environment:
NODE_ENV: production
ports:
- 3000:3000
Loading