-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·88 lines (83 loc) · 2 KB
/
docker-compose.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
version: '2.27'
services:
db:
image: postgres:latest
container_name: "postgres_db"
volumes:
- db_data:/var/lib/postgresql/data
- db_backups:/backups
restart: always
labels:
- "author=${AUTHOR}"
- "project=${SLUG}"
environment:
PGDATA: /var/lib/postgresql/data/pgdata/
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "5432:5432"
api:
build:
context: ./server
dockerfile: Dockerfile
args:
- ASPNETCORE_ENVIRONMENT=Development
container_name: "dotnet_api"
volumes:
- ./server/:/App
restart: always
labels:
- "author=${AUTHOR}"
- "project=${SLUG}"
ports:
- "8080:8080"
depends_on:
- db
environment:
DB_CONNECTION: "Host=db;Port=${POSTGRES_PORT};Username=${POSTGRES_USER};Password=${POSTGRES_PASSWORD};Database=${POSTGRES_DB};"
client:
build:
context: ./client
dockerfile: Dockerfile
args:
- NODE_ENV=development
container_name: "nuxt_client"
volumes:
- ./client/:/app
- /app/node_modules
restart: always
labels:
- "author=${AUTHOR}"
- "project=${SLUG}"
ports:
- "3000:3000"
- "24678:24678"
- "4000:4000"
depends_on:
- api
environment:
API_ADDRESS: "${DEV_API_ADDRESS}"
INTERNAL_API_ADDRESS: "${DEV_INTERNAL_API_ADDRESS}"
NODE_ENV: "development"
backup:
image: alpine
container_name: "db_backup"
volumes:
- ./backup.sh/:/backup.sh
- db_backups:/backups
restart: always
labels:
- "author=${AUTHOR}"
- "project=${SLUG}"
entrypoint: "/bin/sh"
command: "-c 'echo \"0 2 * * * /bin/sh /backup.sh\" | crontab - && crond -f -d 8'"
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
depends_on:
- db
volumes:
db_data:
db_backups: