22 lines
572 B
YAML
22 lines
572 B
YAML
services:
|
|
web:
|
|
build: { context: "." }
|
|
ports:
|
|
- "8080:8080"
|
|
volumes:
|
|
- .:/var/www
|
|
depends_on:
|
|
- db
|
|
environment:
|
|
DATABASE_URL: ${DB:-postgres}://root:secret@db/sqlpage
|
|
db: # The DB environment variable can be set to "mariadb" or "postgres" to test the code with different databases
|
|
ports:
|
|
- "5432:5432"
|
|
- "3306:3306"
|
|
image: ${DB:-postgres}
|
|
environment:
|
|
POSTGRES_USER: root
|
|
POSTGRES_DB: sqlpage
|
|
POSTGRES_PASSWORD: secret
|
|
MYSQL_ROOT_PASSWORD: secret
|
|
MYSQL_DATABASE: sqlpage |