├── FUNDING.yml ├── README.md └── docker-compose.yml /FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: shahinrostami 2 | ko_fi: shahin 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # strapi-docker 2 | 3 | A docker-compose file for getting Strapi up and running with MariaDB/MySQL. 4 | 5 | 6 | ## Instructions 7 | 8 | 1. Download this repository as a ZIP or clone it `git clone https://github.com/shahinrostami/strapi-docker.git`; 9 | 2. Change into the directory `cd strapi-docker`; 10 | 3. Open `docker-compose.yml` in your editor and substitute `C:/srv/` with a directory on your host machine. This must be shared with Docker (check Docker preferences, especially on Windows); 11 | 4. Create the database and application containers using `docker-compose up -d`. 12 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | api: 5 | depends_on: 6 | - db 7 | image: strapi/strapi 8 | restart: unless-stopped 9 | container_name: strapi 10 | environment: 11 | APP_NAME: strapi-app 12 | DATABASE_CLIENT: mysql 13 | DATABASE_HOST: db 14 | DATABASE_PORT: 3306 15 | DATABASE_NAME: db_strapi 16 | DATABASE_USERNAME: my_user 17 | DATABASE_PASSWORD: my_password 18 | DATABASE_SSL: "false" 19 | ports: 20 | - 8080:1337 21 | volumes: 22 | - C:/srv/strapi:/usr/src/api/strapi-app 23 | 24 | db: 25 | image: mariadb:latest 26 | container_name: strapi_db 27 | restart: unless-stopped 28 | environment: 29 | MYSQL_ROOT_PASSWORD: my_root_password 30 | MYSQL_DATABASE: db_strapi 31 | MYSQL_USER: my_user 32 | MYSQL_PASSWORD: my_password 33 | --------------------------------------------------------------------------------