Last active
July 29, 2022 09:56
-
-
Save ejhari/4dcd4bee4bccf2efa38ffbbc4903e33d to your computer and use it in GitHub Desktop.
GitLab CE with Postfix Send Only via Docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# REF: http://docs.gitlab.com/omnibus/docker/ | |
# REF: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-postfix-as-a-send-only-smtp-server-on-ubuntu-14-04 | |
# REF: https://github.com/denouche/docker-gitlab/blob/master/Dockerfile | |
web: | |
image: 'myrepo/gitlab-ce-postfix-send-only' | |
restart: always | |
hostname: 'mysubdomain.mydomain.com' | |
environment: | |
GITLAB_OMNIBUS_CONFIG: | | |
external_url 'http://mysubdomain.mydomain.com' | |
# Add any other gitlab.rb configuration here, each on its own line | |
ports: | |
- '80:80' | |
- '443:443' | |
- '10022:22' | |
volumes: | |
- '/srv/gitlab/config:/etc/gitlab' | |
- '/srv/gitlab/logs:/var/log/gitlab' | |
- '/srv/gitlab/data:/var/opt/gitlab' | |
- '/srv/gitlab/postfix/main.cf:/etc/postfix/main.cf' | |
- '/srv/gitlab/postfix/aliases:/etc/aliases' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM gitlab/gitlab-ce:latest | |
RUN echo "postfix postfix/main_mailer_type select Internet Site" | debconf-set-selections \ | |
&& echo "postfix postfix/mailname string mysubdomain.mydomain.com" | debconf-set-selections \ | |
&& apt-get install -y postfix | |
RUN apt-get install -y \ | |
mailutils | |
RUN grep -q postfix-start.sh /assets/wrapper || sed -i \ | |
'/# Wait for SIGTERM/i # Start postfix service.\nservice postfix start\n' /assets/wrapper | |
CMD ["/assets/wrapper"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment