forked from PythonistaGuild/MystBin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
63 lines (57 loc) · 1.37 KB
/
docker-compose.yaml
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
version: "3.7"
services:
api:
build: mystbin/backend
ports:
- 127.0.0.1:5557:9000/tcp
volumes:
- ./mystbin/database/schema.sql:/etc/schema.sql:ro
- ./config.json:/usr/src/app/config.json:ro
environment:
DEBUG: "${DEBUG}"
container_name: "mystbin-api"
networks:
main:
ipv4_address: 172.25.0.11
depends_on:
- database
database:
image: postgres:14-alpine
ports:
- 127.0.0.1:5558:5432
container_name: "mystbin-database"
volumes:
- postgresdata:/var/lib/postgresql/data/pgdata
- ./mystbin/database/schema.sql:/docker-entrypoint-initdb.d/schema.sql:ro
environment:
POSTGRES_DB: mystbin
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_HOST_AUTH_METHOD: "md5"
PGDATA: /var/lib/postgresql/data/pgdata
networks:
main:
ipv4_address: 172.25.0.12
frontend:
image: node:latest
volumes:
- node_modules:/app/node_modules
- ./config.json:/app/config.json:ro
ports:
- 127.0.0.1:5559:3000
container_name: "mystbin-frontend"
build: ./mystbin/frontend
depends_on:
- api
networks:
main:
ipv4_address: 172.25.0.13
volumes:
postgresdata:
node_modules:
networks:
main:
ipam:
driver: default
config:
- subnet: 172.25.0.0/16