Fakultas Ilmu Komputer UI

Commit 13204210 authored by Muhammad Rafif Elfazri's avatar Muhammad Rafif Elfazri
Browse files

Template for Docker Compose

parent 10799300
# File docker_phx/docker-compose.yml
version: "3.5"
networks:
webnet:
driver: overlay
attachable: true # Needed in order to run custom commands in the container
services:
app:
image: docker_diskuy:0.1.0
ports:
- "80:4000"
env_file:
- config/docker.env
depends_on:
- db
deploy:
replicas: 1
restart_policy:
condition: on-failure
networks:
- webnet
db:
image: postgres:12-alpine
deploy:
replicas: 1
placement:
constraints: [node.role == manager]
restart_policy:
condition: on-failure
volumes:
- "./volumes/postgres:/var/lib/postgresql/data"
ports:
- "4545:5432"
env_file:
- config/docker.env
networks:
- webnet
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment