Skip to content

Commit

Permalink
fix network configuration in devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
pietheinstrengholt committed Jul 23, 2024
1 parent b2c4d8f commit bf3bde4
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
command: sleep infinity

# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
#network_mode: service:mysql
network_mode: service:mysql

environment:
NODE_ENV: development
Expand All @@ -31,6 +31,9 @@ services:
ports:
- 3000:3000

depends_on:
- mysql

# Uncomment the next line to use a non-root user for all processes.
# user: node

Expand All @@ -52,16 +55,16 @@ services:
command: sleep infinity

# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
#network_mode: service:mysql
network_mode: service:mysql

environment:
NODE_ENV: development
VITE_VUE_APP_HOSTNAME: http://app:3000/
VITE_BASE_URL: /
PORT: 8080

# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)
depends_on:
- app

mysql:
container_name: mysql
Expand All @@ -77,11 +80,4 @@ services:
MYSQL_PASSWORD: "rssmonster"
MYSQL_ROOT_HOST: '%'
ports:
- 3306:3306
networks:
- default
# Add "forwardPorts": ["3306"] to **devcontainer.json** to forward MySQL locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)

#volumes:
#mysql-data:
- 3306:3306

0 comments on commit bf3bde4

Please sign in to comment.