fix compose files

This commit is contained in:
Robin 2022-03-10 14:01:54 +01:00
parent 837a6e4485
commit c4df7426dd
2 changed files with 19 additions and 10 deletions

View File

@ -4,24 +4,26 @@ services:
nginx: nginx:
image: namelessmc/nginx:v2-pr12 image: namelessmc/nginx:v2-pr12
ports: ['80:80'] ports: ['8080:8080']
volumes: volumes:
- type: bind # same as php container - type: bind # same as php container
source: ./web source: ./web
target: /data target: /data
# environment: # Change this if you rename the php container environment:
# PHP_FPM: php:9000 NGINX_PORT: 8080
# user: 'youruser' # Change this if you rename the php container
# PHP_FPM: php:9000
depends_on: [php] depends_on: [php]
# restart: always user: '1000' # change this
cap_drop: ['ALL'] cap_drop: ['ALL']
cap_add: ['NET_BIND_SERVICE', 'NET_RAW'] cap_add: ['NET_RAW']
mem_limit: 1024M mem_limit: 1024M
cpus: 1 cpus: 1
ulimits: ulimits:
nofile: 50000 nofile: 50000
nproc: 5000 nproc: 5000
security_opt: 'no-new-privileges:true' security_opt: ['no-new-privileges:true']
# restart: always
php: php:
image: namelessmc/php:v2-pr12 image: namelessmc/php:v2-pr12
@ -29,8 +31,12 @@ services:
- type: bind # same as web container - type: bind # same as web container
source: ./web source: ./web
target: /data target: /data
# user: 'youruser' - target: /tmp
# restart: always tmpfs:
size: 100M
type: tmpfs
depends_on: [db]
user: '1000' # change this
cap_drop: ['ALL'] cap_drop: ['ALL']
cap_add: ['NET_RAW'] cap_add: ['NET_RAW']
cpus: 2 cpus: 2
@ -39,7 +45,8 @@ services:
ulimits: ulimits:
nofile: 5000 nofile: 5000
nproc: 5000 nproc: 5000
security_opt: 'no-new-privileges:true' security_opt: ['no-new-privileges:true']
# restart: always
db: db:
image: mariadb image: mariadb
@ -47,6 +54,7 @@ services:
- type: bind - type: bind
source: ./db source: ./db
target: /var/lib/mysql target: /var/lib/mysql
user: '1000' # change this
environment: environment:
MYSQL_ROOT_PASSWORD: nameless MYSQL_ROOT_PASSWORD: nameless
MYSQL_USER: nameless MYSQL_USER: nameless

View File

@ -21,6 +21,7 @@ services:
- type: bind # same as web container - type: bind # same as web container
source: ./web source: ./web
target: /data target: /data
depends_on: [db]
# user: 'youruser' # user: 'youruser'
# restart: always # restart: always