| 1 |
version: '3' |
| 2 |
volumes: |
| 3 |
redis: |
| 4 |
services: |
| 5 |
redis: |
| 6 |
read_only: true |
| 7 |
image: docker.io/redis:alpine |
| 8 |
command: ["redis-server", "--appendonly", "yes", "--notify-keyspace-events", "Ex"] |
| 9 |
volumes: |
| 10 |
- redis:/data |
| 11 |
tmpfs: |
| 12 |
- /tmp |
| 13 |
- /var/run |
| 14 |
- /run |
| 15 |
init: |
| 16 |
read_only: true |
| 17 |
|
| 18 |
user: ${UID:-1000} |
| 19 |
build: |
| 20 |
context: ./containers/${NODE_IMG:-node16-runtime} |
| 21 |
image: ${NODE_IMG:-node16-runtime} |
| 22 |
env_file: |
| 23 |
- local.env |
| 24 |
volumes: |
| 25 |
- .:/app/code |
| 26 |
command: ["/bin/sh", "-c", "mkdir -p ~/; [ -d ./node_modules ] && echo '** node_modules exists' || npm install"] |
| 27 |
tmpfs: |
| 28 |
- /tmp |
| 29 |
- /run |
| 30 |
task: |
| 31 |
extends: |
| 32 |
service: init |
| 33 |
command: ["npm", "run", "cli", "--", "task"] |
| 34 |
links: |
| 35 |
- redis |
| 36 |
depends_on: |
| 37 |
- redis |
| 38 |
web: |
| 39 |
extends: |
| 40 |
service: init |
| 41 |
command: ["npm", "run", "cli", "--", "web"] |
| 42 |
ports: |
| 43 |
- ${WEB_LISTEN_PORT:-3000}:3000 |
| 44 |
depends_on: |
| 45 |
- redis |
| 46 |
links: |
| 47 |
- mongo |
| 48 |
|