/
docker-compose.yml
46 lines (39 loc) · 1.08 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
version: '3.8'
services:
app:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
args:
VARIANT: 1.17-bullseye
volumes:
- ..:/workspace:cached
# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
environment:
PG_HOST: postgresql
PG_USER: postgres
PG_DATABASE: dinotest
PG_PASSWORD: mysecretpassword
MYSQL_DATABASE: dinotest
MYSQL_HOST: mysql
MYSQL_ROOT_PASSWORD: mysecretpassword
mysql:
image: "mysql:8"
ports:
- "3306:3306"
restart: unless-stopped
environment:
MYSQL_DATABASE: dinotest
MYSQL_ROOT_PASSWORD: mysecretpassword
postgresql:
image: "postgres:13"
ports:
- "5432:5432"
restart: unless-stopped
environment:
POSTGRES_DB: dinotest
POSTGRES_PASSWORD: mysecretpassword
POSTGRES_USER: postgres
# Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)