server-setup/docker-compose.template

52 lines
905 B
Text
Raw Permalink Normal View History

services:
server:
image: image/image:1.0.0
container_name: image
restart: always
ports:
- '3000:3000'
environment:
- VARIABLE=value
volumes:
- ./data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
networks:
- stuff
secrets:
- db_password
deploy:
resources:
limits:
memory: 1000M
healthcheck:
test: command
depends_on:
- db
db:
image: image:1.0.0
container_name: image-db
restart: always
environment:
- STATUS=running
volumes:
- ./mysql:/var/lib/mysql
networks:
- stuff
secrets:
- db_root_password
- db_password
secrets:
db_password:
file: secrets/db_password.txt
db_root_password:
file: secrets/db_root_password.txt
networks:
stuff:
external: false
volumes:
db-data: