From d1c7ba482dbf6fc97a532b5ff76fcb05d08a07c2 Mon Sep 17 00:00:00 2001 From: Aryan Kothari <87589047+thearyadev@users.noreply.github.com> Date: Sat, 20 Jan 2024 17:05:57 +0000 Subject: [PATCH] Add non-root user to all containers --- docker-compose.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 4680e1fb..ba2943be 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,6 +2,7 @@ version: "3.9" services: nginx: image: nginx:latest + user: '1000:1000' depends_on: - server volumes: @@ -13,6 +14,7 @@ services: image: ghcr.io/thearyadev/top500-aggregator-server:latest # build: . + user: '1000:1000' environment: MYSQLDATABASE: 'railway' MYSQLUSER: 'root' @@ -26,13 +28,15 @@ services: image: ghcr.io/thearyadev/top500-aggregator-frontend:latest ports: - "3000:3000" + user: "1000:1000" # these services are internal, so secrets do not matter. database: image: mysql@sha256:566007208a3f1cc8f9df6b767665b5c9b800fc4fb5f863d17aa1df362880ed04 + user: "1000:1000" environment: MYSQL_DATABASE: 'railway' MYSQL_USER: 't5aggr' MYSQL_PASSWORD: 'QiyWsI7y1oGGJjz4biiu' MYSQL_ROOT_PASSWORD: 'QiyWsI7y1oGGJjz4biiu' volumes: - - ./mysql-data:/var/lib/mysql \ No newline at end of file + - ./mysql-data:/var/lib/mysql