Skip to content

Commit

Permalink
chore: created dev container with nextcloud instance
Browse files Browse the repository at this point in the history
  • Loading branch information
distante authored and pulsejet committed Mar 4, 2024
1 parent de7af2b commit 2533108
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Use the official Nextcloud image as the base image
FROM nextcloud

RUN echo "alias ll='ls -alF'" >> /etc/bash.bashrc
# Install Node.js 18 and npm
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get install -y nodejs && \
rm -rf /var/lib/apt/lists/*

# Install Needed libs
# Install Git, wget, and PHP Composer
RUN apt-get update && \
apt-get install -y git wget make unzip

# Install PHP Composer
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
php composer-setup.php --install-dir=/usr/local/bin --filename=composer && \
php -r "unlink('composer-setup.php');"

RUN composer global require "vimeo/psalm"
34 changes: 34 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/alpine
{
"name": "Nextcloud DevContainer",
"dockerComposeFile": ["./docker-compose.yml"],
"service": "nextcloud",
"workspaceFolder": "/var/www/html/custom_apps/memories",
// 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": [],
"postCreateCommand": "echo 'Container Created'",
// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"bmewburn.vscode-intelephense-client",
"muuvmuuv.vscode-just-php-cs-fixer",
"getpsalm.psalm-vscode-plugin",
"esbenp.prettier-vscode",
"Vue.volar",
"Vue.vscode-typescript-vue-plugin"
],
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
// Add any other VS Code settings you need for your project
}
}
},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
"remoteUser": "root"
}
14 changes: 14 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'nextcloud-with-memories'
services:
nextcloud:
build:
context: .
dockerfile: Dockerfile
volumes:
- ./custom_apps:/var/www/html/custom_apps
- ../:/var/www/html/custom_apps/memories
- ./config:/var/www/html/config
- ./data:/var/www/html/data
ports:
- 9080:80
image: nextcloud
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,8 @@ memories.tar.gz
.cache/

bin-ext/

# Dev Container
.devcontainer/config/*
.devcontainer/custom_apps/*
.devcontainer/data/*

0 comments on commit 2533108

Please sign in to comment.