You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Using


TODO

  1. DNS cloud.liutyi.info is registerd
  2. wildcard SSL certificate is obtained
  3. Home router and load balancer set to redirect traffic right
  4. docker and docker-compose installed
  5. docker-compose file created
  6. docker-compose up -d


apt install docker.io
apt installdocker-compose
vi docker-compose.yml
docker-compose up -d


Docker compose file example


example settigs
port to bind8880
HOST FS paths

/docker/mariadb/var/lib/mysql

/docker/nextcloud/var/www/html

credentials

NEXTCLOUD_ADMIN_USER=user1

NEXTCLOUD_ADMIN_PASSWORD=password997

docker-compose.yml
version: '2'

volumes:
  nextcloud:
  db:

services:
  db:
    image: mariadb
    restart: always
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-file-per-table=1 --skip-innodb-read-only-compressed
    volumes:
      - /docker/mariadb/var/lib/mysql:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=password999
      - MYSQL_PASSWORD=password998
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud

  app:
    image: nextcloud
    restart: always
    ports:
      - 8880:80
    links:
      - db
    volumes:
      - /docker/nextcloud/var/www/html:/var/www/html
    environment:
      - MYSQL_PASSWORD=password998
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_HOST=db
      - OVERWRITEHOST=cloud.liutyi.info
      - OVERWRITEPROTOCOL=https
      - NEXTCLOUD_ADMIN_USER=user1
      - NEXTCLOUD_ADMIN_PASSWORD=password997

Check logs

docker-compose logs app
docker-compose logs db

Add some components

docker exec -it root_app_1 bash
apt update
apt install imagemagick ffmpeg

The following additional packages will be installed:
  alsa-topology-conf alsa-ucm-conf dbus fontconfig fonts-droid-fallback fonts-noto-mono fonts-urw-base35 ghostscript gsfonts hicolor-icon-theme i965-va-driver imagemagick-6.q16 intel-media-va-driver libaacs0 libapparmor1 libasound2
  libasound2-data libass9 libasyncns0 libavahi-client3 libavahi-common-data libavahi-common3 libavc1394-0 libavcodec58 libavdevice58 libavfilter7 libavformat58 libavresample4 libavutil56 libbdplus0 libblas3 libbluray2 libbs2b0 libcaca0
  libcairo-gobject2 libcairo2 libcdio-cdda2 libcdio-paranoia2 libcdio19 libchromaprint1 libcodec2-0.9 libcups2 libdatrie1 libdbus-1-3 libdc1394-25 libdjvulibre-text libdjvulibre21 libdrm-amdgpu1 libdrm-common libdrm-intel1
  libdrm-nouveau2 libdrm-radeon1 libdrm2 libedit2 libelf1 libflac8 libflite1 libfribidi0 libgbm1 libgdk-pixbuf-2.0-0 libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-common libgfortran5 libgl1 libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0
  libglx0 libgme0 libgraphite2-3 libgs9 libgs9-common libgsm1 libharfbuzz0b libidn11 libiec61883-0 libigdgmm11 libijs-0.35 libilmbase25 libjack-jackd2-0 libjbig2dec0 libjxr-tools libjxr0 liblapack3 liblilv-0-0 libllvm11
  libmagickcore-6.q16-6-extra libmfx1 libmp3lame0 libmpg123-0 libmysofa1 libnetpbm10 libnorm1 libogg0 libopenal-data libopenal1 libopenexr25 libopenmpt0 libopus0 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpaper-utils
  libpaper1 libpciaccess0 libpgm-5.3-0 libpixman-1-0 libpocketsphinx3 libpostproc55 libpulse0 librabbitmq4 libraw1394-11 librsvg2-2 librsvg2-common librubberband2 libsamplerate0 libsdl2-2.0-0 libsensors-config libsensors5 libserd-0-0
  libshine3 libslang2 libsnappy1v5 libsndfile1 libsndio7.0 libsord-0-0 libsoxr0 libspeex1 libsphinxbase3 libsratom-0-0 libsrt1.4-gnutls libssh-gcrypt-4 libswresample3 libswscale5 libthai-data libthai0 libtheora0 libtwolame0 libudfread0
  libusb-1.0-0 libva-drm2 libva-x11-2 libva2 libvdpau-va-gl1 libvdpau1 libvidstab1.1 libvorbis0a libvorbisenc2 libvorbisfile3 libvpx6 libvulkan1 libwavpack1 libwayland-client0 libwayland-cursor0 libwayland-egl1 libwayland-server0
  libwmf0.2-7 libwrap0 libx11-xcb1 libx264-160 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-randr0 libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxcursor1 libxdamage1 libxfixes3 libxi6
  libxinerama1 libxkbcommon0 libxrandr2 libxrender1 libxshmfence1 libxss1 libxv1 libxvidcore4 libxxf86vm1 libz3-4 libzmq5 libzvbi-common libzvbi0 mesa-va-drivers mesa-vdpau-drivers mesa-vulkan-drivers netpbm ocl-icd-libopencl1
  pocketsphinx-en-us poppler-data shared-mime-info va-driver-all vdpau-driver-all x11-common xkb-data
Suggested packages:
  default-dbus-session-bus | dbus-session-bus ffmpeg-doc fonts-noto fonts-freefont-otf | fonts-freefont-ttf fonts-texgyre ghostscript-x i965-va-driver-shaders imagemagick-doc autotrace cups-bsd | lpr | lprng enscript gimp gnuplot grads
  graphviz groff-base hp2xx html2ps libwmf-bin mplayer povray radiance sane-utils texlive-base-bin transfig ufraw-batch xdg-utils libasound2-plugins alsa-utils libbluray-bdj cups-common jackd2 inkscape libportaudio2 opus-tools pciutils
  pulseaudio libraw1394-doc librsvg2-bin lm-sensors serdi sndiod sordi speex libwmf0.2-7-gtk opencl-icd poppler-utils fonts-japanese-mincho | fonts-ipafont-mincho fonts-japanese-gothic | fonts-ipafont-gothic fonts-arphic-ukai
  fonts-arphic-uming fonts-nanum nvidia-vdpau-driver nvidia-tesla-440-vdpau-driver nvidia-tesla-418-vdpau-driver nvidia-legacy-390xx-vdpau-driver nvidia-legacy-340xx-vdpau-driver
The following NEW packages will be installed:
  alsa-topology-conf alsa-ucm-conf dbus ffmpeg fontconfig fonts-droid-fallback fonts-noto-mono fonts-urw-base35 ghostscript gsfonts hicolor-icon-theme i965-va-driver imagemagick imagemagick-6.q16 intel-media-va-driver libaacs0
  libapparmor1 libasound2 libasound2-data libass9 libasyncns0 libavahi-client3 libavahi-common-data libavahi-common3 libavc1394-0 libavcodec58 libavdevice58 libavfilter7 libavformat58 libavresample4 libavutil56 libbdplus0 libblas3
  libbluray2 libbs2b0 libcaca0 libcairo-gobject2 libcairo2 libcdio-cdda2 libcdio-paranoia2 libcdio19 libchromaprint1 libcodec2-0.9 libcups2 libdatrie1 libdbus-1-3 libdc1394-25 libdjvulibre-text libdjvulibre21 libdrm-amdgpu1
  libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libedit2 libelf1 libflac8 libflite1 libfribidi0 libgbm1 libgdk-pixbuf-2.0-0 libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-common libgfortran5 libgl1 libgl1-mesa-dri
  libglapi-mesa libglvnd0 libglx-mesa0 libglx0 libgme0 libgraphite2-3 libgs9 libgs9-common libgsm1 libharfbuzz0b libidn11 libiec61883-0 libigdgmm11 libijs-0.35 libilmbase25 libjack-jackd2-0 libjbig2dec0 libjxr-tools libjxr0 liblapack3
  liblilv-0-0 libllvm11 libmagickcore-6.q16-6-extra libmfx1 libmp3lame0 libmpg123-0 libmysofa1 libnetpbm10 libnorm1 libogg0 libopenal-data libopenal1 libopenexr25 libopenmpt0 libopus0 libpango-1.0-0 libpangocairo-1.0-0
  libpangoft2-1.0-0 libpaper-utils libpaper1 libpciaccess0 libpgm-5.3-0 libpixman-1-0 libpocketsphinx3 libpostproc55 libpulse0 librabbitmq4 libraw1394-11 librsvg2-2 librsvg2-common librubberband2 libsamplerate0 libsdl2-2.0-0
  libsensors-config libsensors5 libserd-0-0 libshine3 libslang2 libsnappy1v5 libsndfile1 libsndio7.0 libsord-0-0 libsoxr0 libspeex1 libsphinxbase3 libsratom-0-0 libsrt1.4-gnutls libssh-gcrypt-4 libswresample3 libswscale5 libthai-data
  libthai0 libtheora0 libtwolame0 libudfread0 libusb-1.0-0 libva-drm2 libva-x11-2 libva2 libvdpau-va-gl1 libvdpau1 libvidstab1.1 libvorbis0a libvorbisenc2 libvorbisfile3 libvpx6 libvulkan1 libwavpack1 libwayland-client0
  libwayland-cursor0 libwayland-egl1 libwayland-server0 libwmf0.2-7 libwrap0 libx11-xcb1 libx264-160 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-randr0 libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1
  libxcb-xfixes0 libxcursor1 libxdamage1 libxfixes3 libxi6 libxinerama1 libxkbcommon0 libxrandr2 libxrender1 libxshmfence1 libxss1 libxv1 libxvidcore4 libxxf86vm1 libz3-4 libzmq5 libzvbi-common libzvbi0 mesa-va-drivers
  mesa-vdpau-drivers mesa-vulkan-drivers netpbm ocl-icd-libopencl1 pocketsphinx-en-us poppler-data shared-mime-info va-driver-all vdpau-driver-all x11-common xkb-data
0 upgraded, 202 newly installed, 0 to remove and 1 not upgraded.
Need to get 153 MB of archives.
After this operation, 489 MB of additional disk space will be used.

  • No labels