-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompose.example.yml
65 lines (59 loc) · 1.76 KB
/
compose.example.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
version: '3'
services:
##? db container build seperately in ./db/compose.yml
# db:
# container_name: ${IMAGE_BASE_NAME}-db
# image: postgres:15
# restart: unless-stopped
# environment:
# POSTGRES_USER: ${DB_USER:-postgres}
# POSTGRES_PASSWORD: ${DB_PASSWORD:-changeme}
# PGDATA: /data/postgres
# POSTGRES_DB: ${DB_COLLECTION}
# volumes:
# - ./db/postgres:/data/postgres
# ports:
# - "${DB_PORT}:5432"
# networks:
# - this
backend:
container_name: ${IMAGE_BASE_NAME}-backend
image: ${IMAGE_BASE_NAME}-backend:latest # rename ALL 'cutefruit-kypn' to a unique name
restart: unless-stopped
env_file:
- .env
build:
context: ./
dockerfile: ./Dockerfile.backend
# ports: # expose this if you're not using a proxy
# - 3001:3001
networks:
- this
- proxy # comment out if not using proxy
frontend:
container_name: ${IMAGE_BASE_NAME}-frontend
image: ${IMAGE_BASE_NAME}-frontend:latest # rename ALL 'cutefruit-kypn' to a unique name
restart: unless-stopped
env_file:
- .env
build:
context: ./
dockerfile: ./Dockerfile.frontend
# ports: # expose this if you're not using a proxy
# - 3000:3000
networks:
- this
- proxy # comment out if not using proxy
# depends_on:
# - db
# # - backend
networks:
## network first built in ./db/compose.yml, then linked with 'external: true' here
this:
name: ${IMAGE_BASE_NAME}-network
driver: bridge
external: true # external because the db container will first create the network
proxy: # comment out if not using proxy
name: nginx-prox-mgmt-3_default # your unique named proxy network
driver: bridge
external: true