Skip to content

Commit 59b49e0

Browse files
committed
fix: docker-compose networks
* Make all networks explicit (learnocaml-net & moodle-net), so that docker-compose does not create the "learn-ocaml_default" network.
1 parent 55b63d0 commit 59b49e0

File tree

1 file changed

+9
-24
lines changed

1 file changed

+9
-24
lines changed

docker-compose.yml

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -30,30 +30,6 @@ services:
3030
networks:
3131
- learnocaml-net
3232
restart: unless-stopped
33-
networks:
34-
- learnocaml-net
35-
36-
# To uncomment for prod, see also:
37-
# https://github.com/pfitaxel/docker-learn-ocaml/blob/master/docker-compose.yml
38-
#
39-
# postfix:
40-
# container_name: postfix
41-
# image: juanluisbaptiste/postfix
42-
# environment:
43-
# # (postfix variables) remote MTA credentials:
44-
# SMTP_SERVER: "smtp.example.com"
45-
# SMTP_USERNAME: "user@example.com"
46-
# SMTP_PASSWORD_FILE: "/secrets/smtp_password"
47-
# # (postfix variable) DNS of myself, the server sending mails:
48-
# SERVER_HOSTNAME: "mail.localdomain"
49-
# ALWAYS_ADD_MISSING_HEADERS: "yes"
50-
# volumes:
51-
# - "./secrets:/secrets"
52-
# # DO NOT EXPOSE THESE PORTS!
53-
# # ports:
54-
# # - "25:25"
55-
# networks:
56-
# - learnocaml-net
5733

5834
# Only useful for dev
5935
maildev:
@@ -63,6 +39,9 @@ services:
6339
networks:
6440
- learnocaml-net
6541

42+
# For a prod configuration, see also:
43+
# https://github.com/pfitaxel/docker-learn-ocaml/blob/master/docker-compose.yml
44+
6645
# BEGIN https://github.com/bitnami/bitnami-docker-moodle/blob/ffa8007ebb0ebc501eeeba62804d10b0efef3673/docker-compose.yml
6746

6847
mariadb:
@@ -73,6 +52,8 @@ services:
7352
- MARIADB_DATABASE=bitnami_moodle
7453
volumes:
7554
- 'mariadb_data:/bitnami/mariadb'
55+
networks:
56+
- moodle-net
7657
moodle:
7758
image: 'docker.io/bitnami/moodle:3-debian-10'
7859
ports:
@@ -88,6 +69,8 @@ services:
8869
volumes:
8970
- 'moodle_data:/bitnami/moodle'
9071
- 'moodledata_data:/bitnami/moodledata'
72+
networks:
73+
- moodle-net
9174
depends_on:
9275
- mariadb
9376

@@ -107,3 +90,5 @@ networks:
10790
learnocaml-net:
10891
driver: bridge
10992
name: localdomain
93+
moodle-net:
94+
driver: bridge

0 commit comments

Comments
 (0)