From f5765550058566dd94948b84d30d84423e9895e2 Mon Sep 17 00:00:00 2001 From: Kumi Date: Mon, 1 Jul 2024 15:13:34 +0200 Subject: [PATCH] feat(docker): add dev config and update prod image source Introduce docker-compose-example-dev.yml for development environment, enabling local builds with stricter container settings (e.g., no-new-privileges, read-only). Update docker-compose-example.yml to pull the latest version of the structables image from the registry instead of building it locally. Ensures consistent deployment in production and better resource management during development. --- docker-compose-example-dev.yml | 18 ++++++++++++++++++ docker-compose-example.yml | 4 ++-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 docker-compose-example-dev.yml diff --git a/docker-compose-example-dev.yml b/docker-compose-example-dev.yml new file mode 100644 index 0000000..c75ca88 --- /dev/null +++ b/docker-compose-example-dev.yml @@ -0,0 +1,18 @@ +services: + structables: + container_name: structables + restart: unless-stopped + build: . + ports: + - "127.0.0.1:8002:8002" + env_file: .env + security_opt: + - no-new-privileges:true + cap_drop: + - ALL + read_only: true + deploy: + resources: + limits: + cpus: '0.5' + memory: 300M diff --git a/docker-compose-example.yml b/docker-compose-example.yml index c75ca88..9b6a133 100644 --- a/docker-compose-example.yml +++ b/docker-compose-example.yml @@ -2,7 +2,7 @@ services: structables: container_name: structables restart: unless-stopped - build: . + image: privatecoffee/structables:latest ports: - "127.0.0.1:8002:8002" env_file: .env @@ -15,4 +15,4 @@ services: resources: limits: cpus: '0.5' - memory: 300M + memory: 300M \ No newline at end of file