Skip to content

Instantly share code, notes, and snippets.

@colinappnovation
Created December 2, 2018 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save colinappnovation/8409422ef28f39a4c7f3c13a76366a6d to your computer and use it in GitHub Desktop.
Save colinappnovation/8409422ef28f39a4c7f3c13a76366a6d to your computer and use it in GitHub Desktop.
Cockpit Docker Compose Setup
server {
index index.php;
server_name localhost:8080;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
root /var/www/html;
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
}
database:
server: mongodb://ss_mongo:27017
options:
db: cockpit
username: cockpit
password: cockpit
memory:
server: redis://redis:6379
options:
prefix: cockpit
version: '3'
services:
web:
image: nginx:latest
ports:
- "8080:80"
volumes:
- .:/var/www/html:cached
- ./site.conf:/etc/nginx/conf.d/default.conf
links:
- php
- redis
- mongo
php:
build:
context: .
dockerfile: phpfpm
volumes:
- .:/var/www/html:cached
redis:
image: redis:latest
volumes:
- redisdata:/data
ports:
- 6379
mongo:
image: mongo:latest
container_name: "${PROJECT_NAME}_mongo"
environment:
MONGO_INITDB_DATABASE: "cockpit"
MONGO_INITDB_ROOT_USERNAME: cockpit
MONGO_INITDB_ROOT_PASSWORD: cockpit
ports:
- 27017:27017
volumes:
redisdata:
driver: "local"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment