2022-05-25 11:16:38 +02:00
|
|
|
version: "3.9"
|
|
|
|
|
|
|
|
services:
|
|
|
|
node:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: Dockerfile.node
|
|
|
|
|
|
|
|
api:
|
|
|
|
image: "awesome/api"
|
|
|
|
extends:
|
|
|
|
service: node
|
|
|
|
build:
|
|
|
|
args:
|
|
|
|
PACKAGE_PATH: api
|
|
|
|
WORKING_DIR: /usr/src/
|
|
|
|
expose:
|
|
|
|
- 8000
|
|
|
|
ports:
|
|
|
|
- 8000:8000
|
|
|
|
environment:
|
|
|
|
- NODE_ENV=development
|
|
|
|
volumes:
|
|
|
|
- ./api:/usr/src
|
|
|
|
depends_on:
|
2022-05-25 11:47:23 +02:00
|
|
|
- db
|
2022-05-25 11:16:38 +02:00
|
|
|
- adminer
|
2022-05-25 11:47:23 +02:00
|
|
|
- redis
|
2022-05-25 11:55:52 +02:00
|
|
|
networks:
|
|
|
|
- front-tier
|
|
|
|
- back-tier
|
2022-05-25 11:16:38 +02:00
|
|
|
command: ["npm", "start"]
|
|
|
|
|
|
|
|
frontend:
|
|
|
|
extends:
|
|
|
|
service: node
|
|
|
|
build:
|
|
|
|
args:
|
|
|
|
PACKAGE_PATH: frontend
|
|
|
|
WORKING_DIR: /usr/src/
|
|
|
|
expose:
|
|
|
|
- 3000
|
|
|
|
ports:
|
|
|
|
- 3000:3000
|
|
|
|
volumes:
|
|
|
|
- ./frontend:/usr/src
|
|
|
|
depends_on:
|
|
|
|
- api
|
2022-05-25 11:55:52 +02:00
|
|
|
networks:
|
|
|
|
- front-tier
|
2022-05-25 11:16:38 +02:00
|
|
|
command: ["npm", "start"]
|
|
|
|
|
2022-05-25 11:47:23 +02:00
|
|
|
db:
|
|
|
|
image: "awesome/db"
|
|
|
|
extends:
|
|
|
|
service: postgres
|
2022-05-25 12:03:27 +02:00
|
|
|
file: postgres.yml
|
2022-05-25 11:16:38 +02:00
|
|
|
restart: always
|
2022-05-25 11:55:52 +02:00
|
|
|
networks:
|
|
|
|
- back-tier
|
2022-05-25 11:47:23 +02:00
|
|
|
volumes:
|
|
|
|
- "db-data:/data"
|
|
|
|
- type: bind
|
|
|
|
source: /var/run/postgres/postgres.sock
|
|
|
|
target: /var/run/postgres/postgres.sock
|
|
|
|
|
|
|
|
redis:
|
|
|
|
image: "awesome/redis"
|
|
|
|
restart: always
|
2022-05-25 11:55:52 +02:00
|
|
|
networks:
|
|
|
|
- back-tier
|
2022-05-25 11:47:23 +02:00
|
|
|
expose:
|
|
|
|
- 6379
|
2022-05-25 11:16:38 +02:00
|
|
|
|
|
|
|
adminer:
|
2022-05-25 11:47:23 +02:00
|
|
|
image: "awesome/adminer"
|
2022-05-25 11:55:52 +02:00
|
|
|
networks:
|
|
|
|
- back-tier
|
2022-05-25 11:16:38 +02:00
|
|
|
ports:
|
|
|
|
- 8080:8080
|
2022-05-25 11:47:23 +02:00
|
|
|
|
2022-05-25 11:55:52 +02:00
|
|
|
volumes:
|
|
|
|
db-data:
|
|
|
|
|
|
|
|
networks:
|
|
|
|
front-tier:
|
|
|
|
back-tier:
|