Hi all,
I have an issue with a docker-compose that builds a wordpress container. I have set up a mariadb database, and the wordpress successfully adds its files to the database.
However, I am trying to build a nginx container and am having problems. I don’t know if the problem is with wordpress or with my nginx config.
My question is: with only mariadb and wordpress installed, am I able to connect to wordpress with http://localhost:9000?
this is my docker compose:
services:
mariadb:
container_name: mariadb
build: ./mariadb
volumes:
- mariadb_data:/var/lib/mysql
env_file:
- .env
restart: on-failure
networks:
- inception
wordpress:
container_name: wordpress
build: ./wordpress
volumes:
- wordpress_data:/var/www/html
env_file:
- .env
restart: on-failure
networks:
- inception
depends_on:
- mariadb
volumes:
mariadb_data:
wordpress_data:
networks:
inception:
this is my wordpress dockerfile:
FROM debian:bullseye
EXPOSE 9000
RUN apt-get update \
&& apt-get install -y \
php-fpm \
php-mysql \
wget \
tar \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /var/www/
RUN wget -O /tmp/latest.tar.gz https://wordpress.org/latest.tar.gz \
&& tar -xvf /tmp/latest.tar.gz -C /var/www/ \
&& rm /tmp/latest.tar.gz
COPY files/www.conf /etc/php/7.4/fpm/pool.d/www.conf
COPY files/wp-config.php /var/www/wordpress/wp-config.php
COPY files/setup.sh /tmp/
RUN chmod +x /tmp/setup.sh
ENTRYPOINT ["/tmp/setup.sh", "php-fpm7.4", "-F", "-R"]
obs.: this is a school assignment, so I have to build containers from debian:bullseye