mirror of
https://github.com/usatiuk/writer.git
synced 2025-10-29 00:17:48 +01:00
vscode devcontainer attempt 1
This commit is contained in:
1
.devcontainer/Dockerfile
Normal file
1
.devcontainer/Dockerfile
Normal file
@@ -0,0 +1 @@
|
|||||||
|
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:12
|
||||||
16
.devcontainer/devcontainer.json
Normal file
16
.devcontainer/devcontainer.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "Writer app",
|
||||||
|
"dockerFile": "Dockerfile",
|
||||||
|
// Use 'appPort' to create a container with published ports. If the port isn't working, be sure
|
||||||
|
// your server accepts connections from all interfaces (0.0.0.0 or '*'), not just localhost.
|
||||||
|
"appPort": [
|
||||||
|
1234, 3000
|
||||||
|
],
|
||||||
|
// Use 'settings' to set *default* container specific settings.json values on container create.
|
||||||
|
// You can edit these settings after create using File > Preferences > Settings > Remote.
|
||||||
|
"settings": {
|
||||||
|
"terminal.integrated.shell.linux": "/bin/zsh"
|
||||||
|
},
|
||||||
|
// Specifies a command that should be run after the container has been created.
|
||||||
|
"postCreateCommand": "npm i && cd frontend && npm i",
|
||||||
|
}
|
||||||
35
.devcontainer/docker-compose.yml
Normal file
35
.devcontainer/docker-compose.yml
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
#-------------------------------------------------------------------------------------------------------------
|
||||||
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
|
||||||
|
#-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
# Uncomment the next line to use a non-root user for all processes. You can also
|
||||||
|
# simply use the "remoteUser" property in devcontainer.json if you just want VS Code
|
||||||
|
# and its sub-processes (terminals, tasks, debugging) to execute as the user. On Linux,
|
||||||
|
# you may need to update USER_UID and USER_GID in .devcontainer/Dockerfile to match your
|
||||||
|
# user if not 1000. See https://aka.ms/vscode-remote/containers/non-root for details.
|
||||||
|
# user: node
|
||||||
|
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
|
||||||
|
# Overrides default command so things don't shut down after the process ends.
|
||||||
|
command: sleep infinity
|
||||||
|
|
||||||
|
links:
|
||||||
|
- db
|
||||||
|
|
||||||
|
db:
|
||||||
|
image: mariadb
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- 3306:3306
|
||||||
|
environment:
|
||||||
|
MYSQL_PASSWORD: writer
|
||||||
|
MYSQL_USER: writer
|
||||||
|
MYSQL_DATABASE: writer
|
||||||
|
MYSQL_ROOT_PASSWORD: writerroot
|
||||||
Reference in New Issue
Block a user