diff --git a/LICENSE b/LICENSE index 2d0fc88..7935fda 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 Derkades +Copyright (c) 2020 NamelessMC Docker Image Maintainers (https://github.com/NamelessMC/Nameless-Docker/graphs/contributors) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index b62bbfb..d32b095 100644 --- a/README.md +++ b/README.md @@ -16,12 +16,13 @@ You will need to install [Docker Compose](https://docs.docker.com/compose/) for sudo apt install docker-compose ``` -Download the example file, optionally change the directories, passwords, etc. then run it with - -```bash -docker-compose up -d -``` +Download [docker-compose.yml](https://github.com/NamelessMC/Nameless-Docker/raw/master/docker-compose.yml), optionally change some settings, then run `docker-compose up -d`. The default restart policy is `unless-stopped` so your website will start back up after a reboot. When the containers are up, visit the website in a browser to start the installer. By default it listens on any interface, port 80. -When the database configuration page shows up, fill in `namelessmc_db` for the *database address*. For database username, password and database name, fill `nameless` for all of them, if you used default database credentials. +When the database configuration page shows up, fill in `db` for *database address*. For database username, password and database name, fill `nameless` for all of them, if you used default database credentials. + + +## Development + +If you want to use Docker for developing NamelessMC, please see the [docker compose file in the main repo](https://github.com/NamelessMC/Nameless/blob/v2/docker-compose.yaml). \ No newline at end of file diff --git a/build.sh b/build.sh deleted file mode 100755 index 2bdd402..0000000 --- a/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -docker build -t derkades/namelessmc-nginx nginx_web -docker build -t derkades/namelessmc-php php_fpm diff --git a/docker-compose.yml b/docker-compose.yml index 03f976b..e3eb4b2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,21 +2,21 @@ version: '2' services: - namelessmc: - image: derkades/namelessmc-nginx + nginx: + image: namelessmc/nginx ports: ['80:80'] volumes: ['/srv/namelessmc/web:/data'] # same as php container # environment: - # PHP_FPM: namelessmc_php:9000 - depends_on: [namelessmc_php] + # PHP_FPM: php:9000 + depends_on: [php] restart: unless-stopped - namelessmc_php: - image: derkades/namelessmc-php + php: + image: namelessmc/php volumes: ['/srv/namelessmc/web:/data'] # same as web container restart: unless-stopped - namelessmc_db: + db: image: mariadb volumes: ['/srv/namelessmc/db:/var/lib/mysql'] environment: diff --git a/nginx_web/Dockerfile b/nginx_web/Dockerfile index 2eb66a3..fca72df 100644 --- a/nginx_web/Dockerfile +++ b/nginx_web/Dockerfile @@ -1,6 +1,6 @@ FROM nginx:alpine -ENV PHP_FPM="namelessmc_php:9000" +ENV PHP_FPM="php:9000" RUN deluser xfs && \ delgroup www-data && \ diff --git a/nginx_web/nginx.conf b/nginx_web/nginx.conf index 410b6ae..640c53f 100644 --- a/nginx_web/nginx.conf +++ b/nginx_web/nginx.conf @@ -31,6 +31,10 @@ http { try_files $uri $uri/ /index.php?route=$uri&$args; } + location ~ \.(tpl|cache)$ { + return 403; + } + location = /robots.txt { allow all; log_not_found off;