Code Monkey home page Code Monkey logo

Comments (1)

Vertux avatar Vertux commented on June 12, 2024

@obigroup
Here is a working example. Create a new directory e.g. movim and put the following files in it.

docker-compose.yaml

version: '3.7'

services:
  movim:
    depends_on:
      - psql
    container_name: movim
    image: movim/movim:0.14.1rc5
    volumes:
      - ./movim:/var/www/html:rw
    restart: always
    environment:
      MOVIM_ADMIN: admin
      MOVIM_PASSWORD: admin
      MOVIM_DOMAIN: http://localhost
      MOVIM_PORT: 8080
      MOVIM_INTERFACE: 0.0.0.0
      POSTGRES_DB: movim
      POSTGRES_HOST: psql
      POSTGRES_PORT: 5432
      POSTGRES_USER: movim
      POSTGRES_PASSWORD: movim
  nginx:
    depends_on:
      - movim
    container_name: nginx
    image: nginx:latest
    volumes:
      - ./movim:/var/www/html:ro
      - ./default.conf:/etc/nginx/conf.d/default.conf
    ports:
      - "80:80"
    restart: always
  psql:
    container_name: psql
    image: postgres:11.2-alpine
    volumes:
      - ./postgresql/data:/var/lib/postgresql/data
    restart: always
    environment:
      POSTGRES_DB: movim
      POSTGRES_PASSWORD: movim
      POSTGRES_USER: movim

default.conf

server {
    listen       80;
    server_name  localhost;

    index index.php index.html;

    root /var/www/html;

    location / {
        try_files $uri /index.php?$args;
    }

    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass movim:9000;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;
    }

    location /ws/ {
        proxy_pass http://movim:8080/;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;
        proxy_redirect off;
    }
}

@kawaii feel free to add it as working example.

from movim_docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.