friendica-github/.devcontainer/docker-compose.yml

52 lines
1.1 KiB
YAML
Raw Normal View History

version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile
volumes:
- ../..:/workspaces:cached
2024-07-16 17:12:26 +00:00
env_file: ".env"
# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
2024-07-16 17:12:26 +00:00
ports:
- 80:80
- 443:443
- 8080:8080
- 3306:3306
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)
2024-07-16 17:12:26 +00:00
extra_hosts:
- "${ServerAlias}:127.0.0.1"
db:
image: mariadb:10.4
restart: unless-stopped
volumes:
- mariadb-data:/var/lib/mysql
2024-07-16 17:12:26 +00:00
env_file: ".env"
environment:
MYSQL_ROOT_PASSWORD: root
command: ['mysqld', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci']
2024-07-16 17:12:26 +00:00
# Runs app on the same network as the app container, allows "forwardPorts" in devcontainer.json function.
network_mode: service:app
redis:
image: redis:latest
restart: unless-stopped
env_file: ".env"
network_mode: service:app
volumes:
mariadb-data:
networks:
default: