docker-compose.yml
825 bytes
| 1 | # countrysense.rasmusj.com |
|---|---|
| 2 | # |
| 3 | # Caddy already runs on the external `web` network and terminates TLS, so |
| 4 | # nothing is published to the host and the domain lives in /opt/caddy/Caddyfile. |
| 5 | # |
| 6 | # The memory limit is the point of this file. The box has under 2 GB free and no |
| 7 | # swap, and a torch process that grows past its share would take the neighbours |
| 8 | # with it. With a cap, an overrun kills this container alone and Docker restarts |
| 9 | # it. |
| 10 | |
| 11 | name: countrysense |
| 12 | |
| 13 | services: |
| 14 | countrysense: |
| 15 | build: . |
| 16 | container_name: countrysense |
| 17 | restart: unless-stopped |
| 18 | environment: |
| 19 | PORT: '3000' |
| 20 | mem_limit: 1200m |
| 21 | memswap_limit: 1200m |
| 22 | networks: |
| 23 | - web |
| 24 | expose: |
| 25 | - '3000' |
| 26 | logging: |
| 27 | driver: json-file |
| 28 | options: |
| 29 | max-size: '10m' |
| 30 | max-file: '3' |
| 31 | |
| 32 | networks: |
| 33 | web: |
| 34 | external: true |
| 35 | |