Created
November 16, 2022 01:16
-
-
Save benyaminl/0b2c2e45fe7b5d300190f18375493485 to your computer and use it in GitHub Desktop.
Wordpress Dev Docker File (not as git repo, because, it's simpler to be gist than repo...) This docker-compose is specified for podman version >= 4.2.0, because mapping selinux context. It's better to have SELINUX than NOT!
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
version: '3.1' | |
services: | |
wordpress: | |
#image: docker.io/library/wordpress:6.0.2 | |
build: . | |
ports: | |
- 8000:80 | |
- 8443:443 | |
environment: | |
WORDPRESS_DB_HOST: host.containers.internal | |
WORDPRESS_DB_USER: wp | |
WORDPRESS_DB_PASSWORD: wp | |
WORDPRESS_DB_NAME: ecom | |
volumes: | |
- .:/var/www/html:Z |
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 docker.io/library/wordpress:6.0.2 | |
# See https://www.shellhacks.com/create-csr-openssl-without-prompt-non-interactive/ | |
RUN openssl req -new -newkey rsa:2048 -days 1095 -nodes -x509 -keyout /etc/ssl/private/wp.key -out /etc/ssl/private/wp.crt -subj "/C=ID/ST=Surabaya/L=Surabaya/O=ISTTS/OU=IT Department/CN=stts.edu" | |
RUN a2enmod ssl | |
COPY ./wp-ssl.conf /etc/apache2/sites-available/wp-ssl.conf | |
RUN a2ensite wp-ssl | |
EXPOSE 80 | |
EXPOSE 443 | |
CMD /usr/local/bin/apache2-foreground |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment