Added a template Docker Compose file to standardize layout
This commit is contained in:
parent
6d9e1db2cf
commit
9508251865
1 changed files with 46 additions and 0 deletions
46
docker-compose.template
Normal file
46
docker-compose.template
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
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
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
db:
|
||||
image: image:1.0.0
|
||||
container_name: image-db
|
||||
restart: always
|
||||
environment:
|
||||
- STATUS=running
|
||||
networks:
|
||||
- stuff
|
||||
volumes:
|
||||
- ./mysql:/var/lib/mysql
|
||||
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:
|
||||
Loading…
Add table
Add a link
Reference in a new issue