Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker for existing chamilo #10

Open
hichamon306 opened this issue Sep 24, 2022 · 0 comments
Open

Docker for existing chamilo #10

hichamon306 opened this issue Sep 24, 2022 · 0 comments

Comments

@hichamon306
Copy link

Hi Yannick,

We aim to migrate the chamilo platform from standard hosting to a Docker architecture, what do you think about this configuration file?
Dockerfile for webserver (PHP + NGINX):

FROM webdevops/php-nginx:7.4
RUN mkdir -p /app/chamilo
WORKDIR /app
RUN git clone --depth=1 --single-branch -b 1.11.x https://github.com/chamilo/chamilo-lms.git chamilo
WORKDIR /app/chamilo
RUN ls -ll
RUN rm -rf vendor/* web/* composer.lock
RUN su application
RUN composer update
RUN exit
RUN chown -R application:application app main/default_course_document/images main/lang web

docker-compose.yml:

version: "3"
services:
  nginx-reverse-proxy:
    build:
      context: .
      dockerfile: nginx/production/reverse-proxy/Dockerfile
    ports:
      - "80:80"
    depends_on:
      - webserver
    networks:
       - internal
    #volumes:
    #  - ./nginx/production/vhost/chamilo-docker-proxy.conf:/opt/bitnami/nginx/conf/server_blocks/chamilo-docker-proxy.conf:ro
  webserver:
    build:
      context: .
      dockerfile: nginx/production/Dockerfile
    ports: 
      - "8080:80"
    environment:
      #WEB_ALIAS_DOMAIN: chamilo-docker
      WEB_DOCUMENT_ROOT: /app/chamilo
    networks:
       - internal
    volumes:
      - ./data/chamilo/www/app/cache:/app/chamilo/app/cache
      - ./data/chamilo/www/app/log:/app/chamilo/app/log
      - ./data/chamilo/www/app/upload:/app/chamilo/app/upload
      - ./data/chamilo/www/app/home:/app/chamilo/app/home
      #- ./data/chamilo/www/app/config/parameters.yml:/app/chamilo/app/config/parameters.yml # file not found
      - ./data/chamilo/www/app/config/add_course.conf.php:/app/chamilo/app/config/add_course.conf.php
      - ./data/chamilo/www/app/config/auth.conf.php:/app/chamilo/app/config/auth.conf.php
      - ./data/chamilo/www/app/config/course_info.conf.php:/app/chamilo/app/config/course_info.conf.php
      - ./data/chamilo/www/app/config/events.conf.php:/app/chamilo/app/config/events.conf.php
      - ./data/chamilo/www/app/config/mail.conf.php:/app/chamilo/app/config/mail.conf.php
      - ./data/chamilo/www/app/config/profile.conf.php:/app/chamilo/app/config/profile.conf.php
      - ./data/chamilo/www/app/config/configuration.php:/app/chamilo/app/config/configuration.php
      - ./data/chamilo/www/app/courses:/app/chamilo/app/courses
      - ./data/chamilo/www/plugin/ceusi_app:/app/chamilo/plugin/ceusi_app
      - ./data/chamilo/www/plugin/keycloak:/app/chamilo/plugin/keycloak
      - ./nginx/production/vhost/10-location-root.conf:/opt/docker/etc/nginx/vhost.common.d/10-location-root.conf
      - ./nginx/production/vhost/10-php.conf:/opt/docker/etc/nginx/vhost.common.d/10-php.conf
      - ./nginx/production/vhost/chamilo-docker.conf:/opt/docker/etc/nginx/vhost.common.d/chamilo-docker.conf
networks:
  internal:
    driver: bridge

In my local machine, app run without any issue, can I use the same configuration in production ? database will be in dedicated server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant