Skip to content

Commit

Permalink
added nextcloud, mariadb and phpmyadmin
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Treffler <[email protected]>
  • Loading branch information
JonathanTreffler committed Jul 19, 2021
1 parent 8e9713e commit 8a1b7f5
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
github:
prebuilds:
master: true
branches: true
pullRequests: true
pullRequestsFromForks: true
addCheck: true
addComment: false
addBadge: true

tasks:
- name: Nextcloud Server
init: |
cd gitpod
docker-compose up --no-start
command: |
git config core.fileMode false
chmod -R 777 .
cd gitpod
docker-compose up
- name: Terminal
command: clear

ports:
- port: 8080
onOpen: open-browser
visibility: private
- port: 8081
visibility: private
onOpen: ignore
57 changes: 57 additions & 0 deletions gitpod/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# This is for gitpod, DO NOT USE THIS TO HOST YOUR PRODUCTION NEXTCLOUD

version: '2'

volumes:
nextcloud:
db:
config:

services:
db:
image: mariadb
restart: always
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
volumes:
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=wdGq73jQB0p373gLdf6yLRj5
- MYSQL_PASSWORD=wdGq73jQB0p373gLdf6yLRj5
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud

phpmyadmin:
image: phpmyadmin
container_name: pma
links:
- db
environment:
PMA_HOST: db
PMA_PORT: 3306
restart: always
ports:
- 8081:80

app:
image: nextcloud
build:
context: ./nextcloud
dockerfile: Dockerfile
restart: always
ports:
- 8080:80
links:
- db
volumes:
- nextcloud:/var/www/html
- config:/var/www/html/config
- ${GITPOD_REPO_ROOT}:/var/www/html/custom_apps/user_saml
environment:
- MYSQL_PASSWORD=wdGq73jQB0p373gLdf6yLRj5
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_HOST=db
- NEXTCLOUD_ADMIN_USER=dev
- NEXTCLOUD_ADMIN_PASSWORD=t2qQ1C6ktYUv7
- NEXTCLOUD_TRUSTED_DOMAINS=*.gitpod.io
- OVERWRITEPROTOCOL=https
10 changes: 10 additions & 0 deletions gitpod/nextcloud/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM nextcloud

COPY custom-entrypoint.sh /custom-entrypoint.sh
RUN chmod +x /custom-entrypoint.sh

ENTRYPOINT ["/custom-entrypoint.sh"]

# Needs to be set again, even though it is already in base image
# reference: https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact
CMD ["apache2-foreground"]
7 changes: 7 additions & 0 deletions gitpod/nextcloud/custom-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

# Both gitpod and Nextcloud need read/write acess
# Obviously not recommended for a production system
chmod -R 777 /var/www/html/custom_apps/

/entrypoint.sh "$@"

0 comments on commit 8a1b7f5

Please sign in to comment.