adds manual networking to compose
This commit is contained in:
parent
ad39e4aaf0
commit
48318b1dd1
@ -1,19 +1,22 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
database:
|
bump-database:
|
||||||
image: postgres:15
|
image: postgres:15
|
||||||
container_name: bump-database
|
container_name: bump-database
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_USER=postgres
|
- POSTGRES_USER=postgres
|
||||||
- POSTGRES_PASSWORD=postgres
|
- POSTGRES_PASSWORD=postgres
|
||||||
- POSTGRES_DB=db
|
- POSTGRES_DB=db
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- ./postgres-data:/var/lib/postgresql/data
|
- ./postgres-data:/var/lib/postgresql/data
|
||||||
- ./postgresql.conf:/etc/postgresql.conf
|
- ./postgresql.conf:/etc/postgresql.conf
|
||||||
command: postgres -c config_file=/etc/postgresql.conf
|
command: postgres -c config_file=/etc/postgresql.conf
|
||||||
ports:
|
ports:
|
||||||
- "5555:5555"
|
- "5555:5555"
|
||||||
|
networks:
|
||||||
|
bump-network:
|
||||||
|
ipv4_address: 172.20.0.2
|
||||||
bump-server:
|
bump-server:
|
||||||
build:
|
build:
|
||||||
context: ./bump
|
context: ./bump
|
||||||
@ -23,5 +26,16 @@ services:
|
|||||||
- ../bump_server:/app
|
- ../bump_server:/app
|
||||||
ports:
|
ports:
|
||||||
- "4012:4012"
|
- "4012:4012"
|
||||||
|
networks:
|
||||||
|
- bump-network
|
||||||
|
extra_hosts:
|
||||||
|
- "database:172.20.0.2"
|
||||||
depends_on:
|
depends_on:
|
||||||
- database
|
- database
|
||||||
|
|
||||||
|
|
||||||
|
networks:
|
||||||
|
bump-network:
|
||||||
|
ipam:
|
||||||
|
config:
|
||||||
|
- subnet: 172.20.0.0/16
|
||||||
|
Loading…
Reference in New Issue
Block a user