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.
This commit is contained in:
parent
7d81a65b2a
commit
f576555005
2 changed files with 20 additions and 2 deletions
18
docker-compose-example-dev.yml
Normal file
18
docker-compose-example-dev.yml
Normal file
|
@ -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
|
|
@ -2,7 +2,7 @@ services:
|
||||||
structables:
|
structables:
|
||||||
container_name: structables
|
container_name: structables
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
build: .
|
image: privatecoffee/structables:latest
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:8002:8002"
|
- "127.0.0.1:8002:8002"
|
||||||
env_file: .env
|
env_file: .env
|
||||||
|
@ -15,4 +15,4 @@ services:
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpus: '0.5'
|
cpus: '0.5'
|
||||||
memory: 300M
|
memory: 300M
|
Loading…
Reference in a new issue