network_mode: "host"
там где используешь docker NAT т.е. там где ты мапишь 80:80version: "3.3"
services:
backend:
image: backend
container_name: backend
build:
context: .
dockerfile: ./docker/backend/Dockerfile
expose:
- "9000"
volumes:
- .:/var/www/app
networks:
- test-network
nginx:
image: nginx:1.19.0
container_name: nginx
ports:
- "80:80"
volumes:
- .:/var/www/app
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
networks:
- test-network
network_mode: "host"
mysql:
image: mysql:8.0.20
container_name: mysql
ports:
- "3306:3306"
environment:
MYSQL_USER: test
MYSQL_PASSWORD: test
MYSQL_DATABASE: test
MYSQL_ROOT_PASSWORD: test
volumes:
- ./docker/mysql/initialization:/docker-entrypoint-initdb.d
- mysql:/var/lib/mysql
command: --default-authentication-plugin=mysql_native_password
networks:
- test-network
network_mode: "host"
networks:
test-network:
volumes:
mysql:
void next() {
...
else if (token == '=') {
// parse '==' and '='
if (*src == '=') {
src ++;
token = Eq;
} else {
token = Assign;
}
return;
}
else if (token == '+') {
// parse '+' and '++'
if (*src == '+') {
src ++;
token = Inc;
} else {
token = Add;
}
return;
}
else if (token == '-') {
// parse '-' and '--'
if (*src == '-') {
src ++;
token = Dec;
} else {
token = Sub;
}
return;
}
else if (token == '!') {
// parse '!='
if (*src == '=') {
src++;
token = Ne;
}
return;
}
else if (token == '<') {
// parse '<=', '<<' or '<'
if (*src == '=') {
src ++;
token = Le;
} else if (*src == '<') {
src ++;
token = Shl;
} else {
token = Lt;
}
return;
}
else if (token == '>') {
// parse '>=', '>>' or '>'
if (*src == '=') {
src ++;
token = Ge;
} else if (*src == '>') {
src ++;
token = Shr;
} else {
token = Gt;
}
return;
}
else if (token == '|') {
// parse '|' or '||'
if (*src == '|') {
src ++;
token = Lor;
} else {
token = Or;
}
return;
}
else if (token == '&') {
// parse '&' and '&&'
if (*src == '&') {
src ++;
token = Lan;
} else {
token = And;
}
return;
}
else if (token == '^') {
token = Xor;
return;
}
else if (token == '%') {
token = Mod;
return;
}
else if (token == '*') {
token = Mul;
return;
}
else if (token == '[') {
token = Brak;
return;
}
else if (token == '?') {
token = Cond;
return;
}
else if (token == '~' || token == ';' || token == '{' || token == '}' || token == '(' || token == ')' || token == ']' || token == ',' || token == ':') {
// directly return the character as token;
return;
}
...
}