mirror of
https://github.com/usatiuk/writer.git
synced 2025-10-29 00:17:48 +01:00
hopefully working dev container
This commit is contained in:
57
.devcontainer/docker-compose.yml
Normal file
57
.devcontainer/docker-compose.yml
Normal file
@@ -0,0 +1,57 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
# [Choice] Node.js version: 14, 12, 10
|
||||
VARIANT: 14
|
||||
# On Linux, you may need to update USER_UID and USER_GID below if not your local UID is not 1000.
|
||||
USER_UID: 1000
|
||||
USER_GID: 1000
|
||||
|
||||
volumes:
|
||||
- ..:/workspace:cached
|
||||
|
||||
# Overrides default command so things don't shut down after the process ends.
|
||||
command: sleep infinity
|
||||
|
||||
# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
|
||||
network_mode: service:db
|
||||
|
||||
# Uncomment the next line to use a non-root user for all processes.
|
||||
# user: node
|
||||
|
||||
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
|
||||
# (Adding the "ports" property to this file will not forward from a Codespace.)
|
||||
|
||||
db:
|
||||
image: mariadb:latest
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- mariadb-data:/var/lib/mysql
|
||||
environment:
|
||||
MYSQL_DATABASE: writer
|
||||
MYSQL_USER: writer
|
||||
MYSQL_PASSWORD: writer
|
||||
MYSQL_ROOT_PASSWORD: writer
|
||||
|
||||
dbtest:
|
||||
image: mariadb:latest
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- mariadbtest-data:/var/lib/mysql
|
||||
environment:
|
||||
MYSQL_DATABASE: writer_test
|
||||
MYSQL_USER: writer
|
||||
MYSQL_PASSWORD: writer
|
||||
MYSQL_ROOT_PASSWORD: writer
|
||||
|
||||
# Add "forwardPorts": ["5432"] to **devcontainer.json** to forward MongoDB locally.
|
||||
# (Adding the "ports" property to this file will not forward from a Codespace.)
|
||||
|
||||
volumes:
|
||||
mariadb-data:
|
||||
mariadbtest-data:
|
||||
Reference in New Issue
Block a user