Skip to content

Instantly share code, notes, and snippets.

@RavinduSachintha
Last active January 7, 2020 05:23
Show Gist options
  • Save RavinduSachintha/ef21f2ff2f5407b42f349a2a4259f55b to your computer and use it in GitHub Desktop.
Save RavinduSachintha/ef21f2ff2f5407b42f349a2a4259f55b to your computer and use it in GitHub Desktop.
Resources for the medium post of "A trick to develop huge resource consuming applications with a less powerful PC"
version: '3.7'
services:
frontend:
container_name: frontend
build:
context: ./frontend-app/
dockerfile: Dockerfile
volumes:
- './frontend-app:/app'
- '/app/node_modules'
ports:
- '4200:4200'
networks:
test_net:
ipv4_address: 172.230.1.3
depends_on:
- database
- backend
backend:
container_name: backend
build:
context: ./backend-app/
dockerfile: Dockerfile
volumes:
- './backend-app:/app'
- '/app/node_modules'
ports:
- '3000:3000'
networks:
test_net:
ipv4_address: 172.230.1.4
depends_on:
- database
database:
container_name: db-mariadb
image: mariadb:10.3
environment:
MYSQL_ROOT_PASSWORD: root
ports:
- '3306:3306'
volumes:
- 'logvolume01:/var/log'
- ./backends/db/db.sql:/docker-entrypoint-initdb.d/db.sql
networks:
test_net:
ipv4_address: 172.230.1.5
volumes:
logvolume01: {}
networks:
test_net:
ipam:
driver: default
config:
- subnet: '172.230.0.0/16'
# base image
FROM node:12.2.0
RUN apt-get update
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY package.json /app/package.json
RUN npm install
RUN npm install -g @angular/cli@8.3.9 --unsafe
COPY . /app
CMD ng serve --host 0.0.0.0 --proxy-config proxy.conf.json
{
"/api": {
"target": "http://[IP]:3000",
"secure": false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment