-
Notifications
You must be signed in to change notification settings - Fork 1
/
local.yml
74 lines (69 loc) · 2.14 KB
/
local.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
version: '3'
volumes:
local_postgres_data: {}
local_postgres_data_backups: {}
services:
django:
build:
context: .
dockerfile: compose/local/django/Dockerfile
image: 282428440465.dkr.ecr.us-east-1.amazonaws.com/overflowedminds_local_django
container_name: django
depends_on:
- postgres
- frontend
volumes:
- ./backend:/app:z
env_file:
- backend/.envs/.local/.django
- backend/.envs/.local/.postgres
ports:
- "8000:8000"
command: /start
postgres:
build:
context: .
dockerfile: compose/production/postgres/Dockerfile
image: 282428440465.dkr.ecr.us-east-1.amazonaws.com/overflowedminds_production_postgres
container_name: postgres
volumes:
- local_postgres_data:/var/lib/postgresql/data:Z
- local_postgres_data_backups:/backups:z
env_file:
- backend/.envs/.local/.postgres
# This is custom added to connect to the DB from outside docker
ports:
- "6666:5432"
frontend:
build:
context: .
dockerfile: compose/local/frontend/Dockerfile
image: overflowedminds_production_frontend
stdin_open: true # because npm start opens a browser, we need to instantiate the container in interactive mode
volumes:
- ./frontend/:/app
# the node_modules directory would be overwritten by the mounting of the host directory at runtime.
# 1. the node_modules directory would be overwritten by the mounting of the host directory at runtime.
# 2. The current directory is mounted into the container, overwriting the node_modules that were installed during the build.
- /app/node_modules
env_file:
- frontend/.envs/.local/.react
command: |
npm start
ports:
- '3000:3000'
docs:
image: 282428440465.dkr.ecr.us-east-1.amazonaws.com/overflowedminds_local_docs
container_name: docs
build:
context: .
dockerfile: compose/local/docs/Dockerfile
env_file:
- backend/.envs/.local/.django
volumes:
- ./docs:/docs:z
- ./config:/app/config:z
- ./backend:/app/backend:z
ports:
- "7000:7000"
command: /start-docs