Several changes
- Add hostnames to the container. - Add a custom bridge network so that the containers and the host can have a static IP and that can be added in the configurations. - Assign static IPs to all the containers in the new default configuration.
This commit is contained in:
@@ -6,6 +6,7 @@ services:
|
|||||||
context: ./core
|
context: ./core
|
||||||
image: maxking/mailman-core:latest
|
image: maxking/mailman-core:latest
|
||||||
container_name: mailman-core
|
container_name: mailman-core
|
||||||
|
hostname: mailman-core
|
||||||
volumes:
|
volumes:
|
||||||
- /opt/mailman/core:/opt/mailman/
|
- /opt/mailman/core:/opt/mailman/
|
||||||
links:
|
links:
|
||||||
@@ -14,14 +15,16 @@ services:
|
|||||||
- database
|
- database
|
||||||
environment:
|
environment:
|
||||||
- DATABASE_URL=postgres://mailman:mailmanpass@database/mailmandb
|
- DATABASE_URL=postgres://mailman:mailmanpass@database/mailmandb
|
||||||
|
networks:
|
||||||
|
mailman:
|
||||||
|
ipv4_address: 172.19.199.2
|
||||||
|
|
||||||
mailman-web:
|
mailman-web:
|
||||||
build:
|
build:
|
||||||
context: ./web
|
context: ./web
|
||||||
image: maxking/mailman-web:latest
|
image: maxking/mailman-web:latest
|
||||||
container_name: mailman-web
|
container_name: mailman-web
|
||||||
ports:
|
hostname: mailman-web
|
||||||
- "8000:8000"
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- database
|
- database
|
||||||
links:
|
links:
|
||||||
@@ -35,6 +38,9 @@ services:
|
|||||||
- UWSGI_WORKERS=2
|
- UWSGI_WORKERS=2
|
||||||
- UWSGI_THREADS=4
|
- UWSGI_THREADS=4
|
||||||
- DATABASE_URL=postgres://mailman:mailmanpass@database/mailmandb
|
- DATABASE_URL=postgres://mailman:mailmanpass@database/mailmandb
|
||||||
|
networks:
|
||||||
|
mailman:
|
||||||
|
ipv4_address: 172.19.199.3
|
||||||
|
|
||||||
database:
|
database:
|
||||||
environment:
|
environment:
|
||||||
@@ -45,3 +51,15 @@ services:
|
|||||||
image: postgres:9.6
|
image: postgres:9.6
|
||||||
volumes:
|
volumes:
|
||||||
- /opt/mailman/database:/var/lib/postgresql/data
|
- /opt/mailman/database:/var/lib/postgresql/data
|
||||||
|
networks:
|
||||||
|
mailman:
|
||||||
|
ipv4_address: 172.19.199.4
|
||||||
|
|
||||||
|
networks:
|
||||||
|
mailman:
|
||||||
|
driver: bridge
|
||||||
|
ipam:
|
||||||
|
driver: default
|
||||||
|
config:
|
||||||
|
-
|
||||||
|
subnet: 172.19.199.0/24
|
||||||
|
|||||||
Reference in New Issue
Block a user